tags:

views:

68

answers:

2
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?

+7  A: 

use mysql_data_seek. This function will allow you to move the internal result pointer.

frakt
A: 
$result2 = $result;
while($row = mysql_fetch_array($result)){ 
  echo $row['id'];
}



while($row = mysql_fetch_array($result2)){ 
  echo $row['id'];
}
Stewie
Are you sure the above code is correct? It does not seem to be working.
Karthik Kottapalli