yii2-arraysearch Advanced Search inside Array

  1. Requirements
  2. Usage
  3. Resources

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
//        )
//
// )

Resources

0 0
2 followers
0 downloads
Yii Version: 2.0
License: PHP-3.0
Category: Others
Developed by: serhatozles
Created on: Dec 15, 2014
Last updated: 9 years ago

Related Extensions