Jump to content

[SOLVED] Can you assign a While Loop to a variable? If so, how?


itsureboy

Recommended Posts

I'm new to PHP and everything, so I was wondering. Is it possible to assign a WHILE loop to a variable.

 

I am trying this, just in case it is even possible.

 

$query = while($row = mysql_fetch_array($result)){ echo ' OR commenterid = '.$row['friendid'].' '; };  

 

And get the error: Parse error: syntax error, unexpected T_WHILE

 

Thanks ahead,

      Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.