When I use
$x = $result->fetch_all($result = MYSQLI_NUM);
I get a multidimensional array, since each row is an array of columns and then the collection of rows is the outer array.
My problem is this, I want to scan the inner array's 2nd item for a value so I don't have to loop through the entire result set each time through.
Sample result set would look something like this
array(
array(
xxxx,
A
),
array(
yyyyy,
B
),
)
How can I scan for that 2nd value without looping?
I have tried array_search and array_intersect, but I am not able to construct the code properly.
Say I wanted to return the content of array that has "B", How would I do that?