Jump to content

if statement not working


onedumbcoder

Recommended Posts

i am trying to see if an element exist in result, if not print out br, but it is not doing that

 

if(!$emptyList && $counterX > 0)
{
right();
$loop++;

if($tracker)
{
	if(isset($result))
	{
		$List = mysql_fetch_array($result);
	}
	else
	{
		$emptyList = true;
	}
}
}
else
{
echo "<br>";
}

 

 

here result has only one element so after the first time it runs, it should go to emptylist = true, but that is not happening it is going to $list = mysql_fetch_array($result)

 

can someone help me.

 

ps

 

the number of rows affected was 1, so i know for sure there is only one element.

Link to comment
https://forums.phpfreaks.com/topic/113482-if-statement-not-working/
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.