Re: Odd Code Error.
| From: | Eric Bolikowski | Date: | Tue, 20 Jan 2004 23:15:47 +0000 |
| Subject: | Re: Odd Code Error. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175224@lists.php.net to get a copy of this message | ||
Extremely odd what's happening here.... :s
I just doesn't make sense why the if condition should do this...
Maybe you could search in the PHP Manual for more info on this.
However, i did one thing that made that not work.
<?php
$EA = 0;
//using strict comparison operator
if ($EA === 'NFH'){
echo "<br>EA is Equal To NFH see $EA<br>";
}else{
echo "<br>EA is NOT EQUAL to NFH see $EA<br>";
}
?>
Here I use the strict comparison operator, and it writes out the last
sentence.
Very odd this code
Eric
"Jonathan Pitcher" <jpitcher@cfedc.com> wrote in message
news:AE0B7D2E-4B9B-11D8-8645-003065A83C6E@cfedc.com...
> I am so frustrated at the moment with coding. I had an odd error with
> some PHP coding. And in the process I came across this error.
>
> Please try this out!! Because for me on my machine it does the first
> part of the if statement. I can make a work around in my code to fix
> the error. BUT I would rather know why this is evaluating incorrectly.
>
> <?PHP
>
> $EA = 0;
>
> if ($EA == "NFH")
> {
> echo "<br>EA is Equal To NFH see $EA<br>";
> }
> else
> {
> echo "<br>EA is NOT EQUAL to NFH see $EA<br>";
> }
> ?>
>
> Thanks in advance.
>
>
> Jonathan Pitcher