PHP mysql_fetch_array
Posted
by rag
on Stack Overflow
See other posts from Stack Overflow
or by rag
Published on 2010-04-07T05:03:31Z
Indexed on
2010/04/07
5:13 UTC
Read the original article
Hit count: 274
$n=mysql_num_rows($rs);
$i=0;
while($n>0)
{
while(($row=mysql_fetch_array($rs))&&$i<=5)
{
echo $row['room_name'];
$i=$i+1;
//echo $n."<br>";
}
echo "<br>";
//echo "n1=".$n;
$n=$n-5;
//
$i=0;
}
Output:101102103104105106
108109110
The row for roomname 107 is missing.... anybody please tell me what is the problem while reentering the loop again...
© Stack Overflow or respective owner