while($row = mysql_fetch_array($result)){ echo $row['id'];}
If I use the above code two times consecutively, the row does not get printed twice.
How to reset it?
while($row = mysql_fetch_array($result)){ echo $row['id'];}
If I use the above code two times consecutively, the row does not get printed twice.
How to reset it?
use mysql_data_seek. This function will allow you to move the internal result pointer.
$result2 = $result;
while($row = mysql_fetch_array($result)){
echo $row['id'];
}
while($row = mysql_fetch_array($result2)){
echo $row['id'];
}