Jump to content

PHP while() question.


markeh

Recommended Posts

No, it did not work. How can I fix this warning:

 

Description Resource Path Location Type

bool-assign : Assignment in condition login.php game line 40 Code Analyzer Error

 

$teller = 1;
$row = mysql_fetch_array($sql);
while ($row = mysql_fetch_array($sql)) 
  {
 if ($row['badge'] == $user['badge'])
 {
	$badge_selected = $teller;
}
 session_badges[$teller] = $row['badge'];
 $teller++;
}

 

Any ideas?

Link to comment
https://forums.phpfreaks.com/topic/165579-php-while-question/#findComment-873383
Share on other sites

To me, that looks like a bug in Zend studio. Its basically saying that you are creating an assignment within a condition, which you need to do in order to loop through your results ($sql).

 

I have no knowledge of what that means...

 

Anything else you can suggest? Is there a way I can ignore these warnings? There really annoying because I have about 160 of them in my code.

Link to comment
https://forums.phpfreaks.com/topic/165579-php-while-question/#findComment-873408
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.