You are here: Re: trouble with echo <br /> « PHP Programming Language « IT news, forums, messages
Re: trouble with echo <br />

Posted by Khai on 10/26/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.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация