Re: echo vs print
| From: | Philip Olson | Date: | Fri, 09 Feb 2001 07:05:33 +0000 |
| Subject: | Re: echo vs print | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-38908@lists.php.net to get a copy of this message | ||
On Thu, 8 Feb 2001, Todd Cary wrote:
> I have "Profession PHP Programming" and I see that echo() and print()
> are used alomst interchangeably. When should each one be used?
What is the difference between echo and print ?
-------------------------------------------------------------
http://www.faqts.com/knowledge_base/view.phtml/aid/1/fid/41
> Also, I see "<?php" and "<?" used. Is there a preference?
<? is a short tag, <?php is not. <?php will always work, everywhere,
always. This is what should be used. <? will most likely always work
wherever your script may travel but keep in mind, this setting can be
turned off. See :
http://www.php.net/manual/en/configuration.php#ini.short-open-tag
> And how about "};" versus "}" to end a block? I see both.
Don't do }; as it looks funny. Btw, I've never seen }; used within the
manual.
Regards,
Philip