Re: Odd Code Error.

From: Date: Wed, 21 Jan 2004 01:37:05 +0000
Subject: Re: Odd Code Error.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-175258@lists.php.net to get a copy of this message
Hi, Wednesday, January 21, 2004, 8:55:01 AM, you wrote: JP> I am so frustrated at the moment with coding. I had an odd error with JP> some PHP coding. And in the process I came across this error. JP> Please try this out!! Because for me on my machine it does the first JP> part of the if statement. I can make a work around in my code to fix JP> the error. BUT I would rather know why this is evaluating incorrectly. JP> <?PHP JP> $EA = 0; JP> if ($EA == "NFH") JP> { JP> echo "<br>EA is Equal To NFH see $EA<br>"; JP> } JP> else JP> { JP> echo "<br>EA is NOT EQUAL to NFH see $EA<br>"; JP> } ?>> JP> Thanks in advance. JP> Jonathan Pitcher Try swapping positions if("NFH" == $EA) -- regards, Tom

« previous php.general (#175258) next »