+ 1
while($row=mysql_fetch _array($run)) which loop can i use in place of while loop to fetch data from database ?
5 Answers
+ 1
mysql_fetch_array() can only work with while loop. so there is no alternative loop that can be used in place of while loop.
0
while is the correct loop to be used in this place. What is your problem with while
0
But this is interview question
0
No i were just saying that in place of while loop , other loop can work or not.
0
while($data = $sql->fetch(PDO::FETCH_OBJ){
$data->whateverData;
}