This function is searching inside of array.
Requirements ¶
Yii 2.0
Usage ¶
$query = "a='Example World' and b>='2'";
$Array = array(
'a' => array('d' => '2'),
array('a' => 'Example World','b' => '2'),
array('c' => '3'),
array('d' => '4'),
);
$Result = \serhatozles\arraysearch\ArraySearch::q($Array,$query,1);
echo '<pre>';
print_r($Result);
echo '</pre>';
// Output:
// Array
// (
// [0] => Array
// (
// [a] => Example World
// [b] => 2
// )
//
// )
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.