|
Posted by Khai on 10/27/48 11:33
Man, you were so right. AS soon as I saw the first Try $good = TRUE; it
dawned on me that I never set the $good to anything except FALSE. So when
it was testing for $good == TRUE it was coming up false, because $good was
never ever set to true, it was just an empty var. *smacks forhead*.
However, I changed my echo setup and went with escaping to HTML, IE:
<?php if ($good = TRUE) { ?>
blah blah <br />
<?php }; ?>
THat seems to work better, but still having issues getting the <br />
instead of the <br> it keeps punching out. Perhaps it's just in cache and I
need to clear it.
Thanks =)
-khai
"Sean" <oreilly.sean@gmail.com> wrote in message
news:1133549200.573351.284560@g49g2000cwa.googlegroups.com...
> Echo is a construct, print is a function. I think speed wise they
> should both be the same.
>
> Try
>
> $good = TRUE;
>
> if($good == TRUE) { echo "blah <br />"; }
>
> You forgot those semi colons. Not sure why it isn't printing out the
> />.
>
> This
>
> $good = TRUE;
>
> if($good = TRUE) { echo "blah <br />"; }
>
> Will always evaluate to try because instead of doing a comparison you
> are doing an assignment.
>
[Back to original message]
|