Connecting Tech Pros Worldwide Forums | Help | Site Map

echo vs print

James Smith
Guest
 
Posts: n/a
#1: Jul 17 '05
What's the difference between Echo and Print?

J.

Herbie Cumberland
Guest
 
Posts: n/a
#2: Jul 17 '05

re: echo vs print


In message-id <40d39a93$0$16104$afc38c87@news.optusnet.com.au> ,
James Smith wrote:
[color=blue]
>What's the difference between Echo and Print?[/color]

http://www.faqts.com/knowledge_base/...l/aid/1/fid/40


Chung Leong
Guest
 
Posts: n/a
#3: Jul 17 '05

re: echo vs print



"James Smith" <smitro@myrealbox.com> wrote in message
news:40d39a93$0$16104$afc38c87@news.optusnet.com.a u...[color=blue]
> What's the difference between Echo and Print?
>
> J.[/color]

Print is possible only when there's freedom of the press. Otherwise all you
can do is echo.


CJ Llewellyn
Guest
 
Posts: n/a
#4: Jul 17 '05

re: echo vs print


"James Smith" <smitro@myrealbox.com> wrote in message
news:40d39a93$0$16104$afc38c87@news.optusnet.com.a u...[color=blue]
> What's the difference between Echo and Print?[/color]

One is spelt echo and the other is spelt print otherwise they are pretty
much the same, and your choice will depend on what programming languages you
used prior to php or what source you learnt php from.


Pedro Graca
Guest
 
Posts: n/a
#5: Jul 17 '05

re: echo vs print


James Smith wrote:[color=blue]
> What's the difference between Echo and Print?[/color]

Although both are language constructs, print() can be used as a
function.


1 <?php
2
3 $x = 'hello world';
4
5 if (print($x)) echo 'if (print()) worked';
6 echo "\n";
7 if (echo ($x)) echo 'if (echo()) worked';
8 echo "\n";
9
10 ?>


Here, line 7 gives a parse error.

--
USENET would be a better place if everybody read: | to email me: use |
http://www.catb.org/~esr/faqs/smart-questions.html | my name in "To:" |
http://www.netmeister.org/news/learn2quote2.html | header, textonly |
http://www.expita.com/nomime.html | no attachments. |
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
#6: Jul 17 '05

re: echo vs print


James Smith <smitro@myrealbox.com> wrote in message news:<40d39a93$0$16104$afc38c87@news.optusnet.com. au>...[color=blue]
> What's the difference between Echo and Print?[/color]

Manual is your friend. www.php.net/<keyword>
==> http://www.php.net/echo

--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com
Justin Koivisto
Guest
 
Posts: n/a
#7: Jul 17 '05

re: echo vs print


James Smith wrote:
[color=blue]
> What's the difference between Echo and Print?[/color]

echo is faster and less to type. ;)

--
Justin Koivisto - spam@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Closed Thread


Similar PHP bytes