Skip to content

4rakcheev/php-ArrayStructFilter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

ArrayStructFilter

Using

$list = [
            [
                'int'=>1,
                'value'=>null,
                'color'=>'red',
            ],
            [
                'int'=>0,
                'value'=>'string',
                'color'=>'red',
            ],
            [
                'int'=>1,
                'value'=>'second_string',
                'color'=>'brown',
            ],
        ];
        
$brownFilter = new AStructFilter($list, ['int'=>1, 'color'=>'brown'], AStructFilter::CONDITION_AND);
$result = $brownFilter->run();
print_r($result);

Result

Array
(
    [2] => Array
        (
            [int] => 1
            [value] => second_string
            [color] => brown
        )
 
)

About

Helper class to filter list of elements

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages