开发者

How do we implement nested while loop in PHP?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜