I am using multiple mysql queries from different databases, pulling out the values from the while loop with arrays and them reuniting them in a loop as this one:
$len = max(count($insrtdate),count($energy));
for($i=0;$i<$len;$i++){
$date = isset($insrtdate[$i]) ? $insrtdate[$i] : '';
$energy1 = isset($energy[$i]) ? $energy[$i] : '';
echo $energy1;
}
The value $energy1
is initially 0 and i want to detect the row in which this changes to any number and the row in which this returns to the initial value of 0.