what's wrong with this code?

Posted by Piyush on Stack Overflow See other posts from Stack Overflow or by Piyush
Published on 2010-05-26T11:02:18Z Indexed on 2010/05/26 11:11 UTC
Read the original article Hit count: 254

Filed under:
|
$child= array();
$i = 0;

while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
    $child[i] = $row['userId'];
    $i++;
} 

$i = 0;
while($i<=5)
{
    echo $child[i];
    $i++;
}

It is printing same value.

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql