Can someone help me on how to implement a nested while loop in PHP?
Please give some example it will be highly appreciated. I am getting problem in internal while:
while ($record = db_fetch_object($username))
{
$userArray[] = $record->uid; //print "waheed----";
while($recordfile = db_fetch_Object($userfile))
{
print "waheed";
$userArray [$record->uid][] = $record开发者_Python百科file->fid;
}
}
while($condition1)
{
while($condition2)
{
// statements
}
}
EDIT
I guess this is the problem with the while loop of AAMIR:
$recordfile = db_fetch_Object($userfile)
the word object has Capital case 'O'. Make it small.
精彩评论