Skip to content Skip to sidebar Skip to footer

Php Mysqli_fetch_array How To Go To Next Row?

I have a php and mysql script, where I want to create different results based on the values found in mysql table. I compare te value in the horas array to the value of my hora vari

Solution 1:

You don't need to call any next method, this code does that for you:

while($row = mysqli_fetch_array($result)){

(Edited) Since you have a for-loop iteration inside your while-loop, you can put a break; that will end your inner for-loop, which will start the next iteration of your while-loop (which will go to the next row of your SQL result)

Solution 2:

Use the continue command:

continue;

http://php.net/manual/en/control-structures.continue.php

Post a Comment for "Php Mysqli_fetch_array How To Go To Next Row?"