I have array:
Array ( [0] => Array ( [0] => Apples [Query] => Apples ) [1] => Array ( [0] => Bananas [Query] => Bananas ) [2] => Array ( [0] => Bananas [Query] => Bananas ) [3] => Array ( [0] => Oranges [Query] => Oranges ) )
Unfortunately I have no control over the original structure of this array. So this is what we have to work with.
What I am trying to do is remove only the first key,value pair that matches a custom value that I define.
For Example:
$toRemove = 'Bananas';
Applied to a yet unknown miracle piece of code would result in:
Array ( [0] => Array ( [0] => Apples [Query] => Apples ) [2] => Array ( [0] => Bananas [Query] => Bananas ) [3] => Array ( [0] => Oranges [Query] => Oranges ) )
Notice how the second set of Bananas values remained untouched. I don't mind if you want to re-index because of gap this creates.
And if it wasn't challenging enough this needs to be done without a for loop.