I have to filter an array for PrestaShop. I have some raw data, but I have to filter this. So I have some inputs for search in raw data and I try in many ways but my boss still says there is a better way. I don't get this so I need help.
<?php
// Raw data
$data = array(
array('id' => 1, 'name' => "Andrei", "time" => 3),
array('id' => 5, 'name' => "David", "time" => 62),
array('id' => 8, 'name' => "Igor", "time" => 12),
array('id' => 4, 'name' => "Jack", "time" => 3),
);
// These are condition for filter my $data
// In this condition i want filter my $data by name and time
$conditions = array('id' => null, 'name' => "David", 'time' => "3");
?>
The question is what is the best way or method for filter for all combination of my $condition
?