<?php $previousDay = null; foreach ($days as $day) { if(isset($previousDay)) { // Do the calculations with $day being the current one and prevDay the previous day (night?) } else { // For the first day of the array you have no previous so do normal calculations or smth } $previousDay = $day; }
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`