I have a question:
How is it possible to know when a variable in php changes value in a while cycle?
I have a query that I make to a BD in which it brings me several data, among them it brings me the number of days elapsed.
Then I throw the data through a while loop:
while ($row_h=mysqli_fetch_array($resultado4)){
$cel_b = $letter_h.$cel_hrango;
//$row_h['momento'] es el valor de la consulta de días puede tener valores 55,55,55,55,55,56,56,56,56,56,57,57,57,57,57,58
$momento_h = intval($row_h['momento']);
if($momento != intval($row_h['momento'])){
//Hacer muchas cosas uju!
}
}
How do I get this change of variable detected and be able to enter the IF?