Jump to content

[SOLVED] for or while loop


salman_ahad@yahoo.com

Recommended Posts

What is my error?...I need to send message[$x] to user[$w]...but is is not working

 

...
$userArray['username'][$w]=$row['usernm'];	//getting users from user table
$messageArray['message'][$x]=$row['message'];	       //getting messages from message table
...
for($i=0 ; $i<$userCounter ; $i++)                  //I checked the counter, it has correct no: of users
  {
while ($w==$x)
	{
        $username=$userArray['username'][$w];
	$message=$messageArray['message'][$x];
	if(strlen($message)<1)
		{
		 echo $error;
		} 
	else 
		{
                         ................
                         ................
	         }
	}
}


Link to comment
https://forums.phpfreaks.com/topic/179922-solved-for-or-while-loop/
Share on other sites

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.