I have an array like this:
$array=[
0 => [col_a => 1, col_b => 2, col_c =>3],
1 => [col_a => 2, col_b => 3, col_c =>4]
];
Is there a way to do something like:
$result=query_array($array,"SELECT col_c FROM ARRAY WHERE col_a=2 AND col_b=3");
print_r($result);
// array (col_c => 4)
EDIT:
where query_array is a function that executes SQL to an array.
I know I can loop between the elements and test every "row". I was wondering if there is a build-in function that does that like that fictional query_array function.
array_filter(..)and make the callbacks to emulate your where clause..