I'm trying to filter out values by their even index numbers, but it isn't going well. $date is being return as the full array but with the last index missing. Is this because I'm using explode()?
Here's my code;
$route = "Dest A:0900:Dest B:0930:Dest C:1000";
$route_array = explode(":", $route);
foreach($route_array as $key){
if(!($key & 1)){
$date[] .= $key;
}
}
return $date;