开发者

How do we implement nested while loop in PHP?

开发者 https://www.devze.com 2023-03-09 14:17 出处:网络
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:

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

精彩评论

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