Re: Just curious about the echo commnad
| From: | Jason Wong | Date: | Tue, 22 Oct 2002 17:37:24 +0000 |
| Subject: | Re: Just curious about the echo commnad | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22590@lists.php.net to get a copy of this message | ||
On Wednesday 23 October 2002 01:30, Chris Payne wrote:
> Hi there everyone,
>
> This isn't urgent i'm just curious :-) If I want to use HTML code in my
> PHP, I usually close the PHP with ?> do the HTML command with <?=$code?> if
> I need to output PHP then open PHP again with <? if I need to write alot of
> PHP.
>
> However, i've noticed alot of people use echo to output HTML instead of
> this other method, which method is correct and why? I just want to
> understand if I am doing it a bad way or if I should learn to adopt echo's
> for everything?
>
> Thanks, just curious so no hurry for a reply :-)
Both methods work, just use whichever you prefer. One of PHP's strengths is
its flexibility in allowing you to work the way you want -- kind of :)
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Familiarity breeds contempt -- and children.
-- Mark Twain
*/