I have a problem using a variable inside this array filter:
$lteam_id = 25;
$flt_lteam = array_filter($events, function($obj)
{
return $obj['team_id'] == $lteam_id && $obj['type'] == 'kick' && $obj['minute'] <= 75 ;
});
As soon as I replace $lteam_id
with 25
it works and I get a result. Using the variable results in an array(0) { }
... Hope you can help me here on using the variables correctly.