$dMax) $dMax = $delta; if ($delta<$dMin) $dMin = $delta; $tVar0[$f['time']] = $variation; /* { "travel_date":"2020-05-10 14:54:04+00", "cost":"12", "location_start_lat":"1.319292", "location_start_lng":"103.9126091", "location_end_lat":"1.316269", "location_end_lng":"103.977615", "origin":"Central East - Eunos", "destination":"Far East - Changi", "c":"#5555ff"} */ //if ($i<5) error_log(json_encode($t)); return [$trend, $delta, $variation]; }