...

View Full Version : echo vs print.. any difference?



Democrazy
09-20-2011, 02:12 PM
Is there actually any difference or is one of them in use?

tangoforce
09-20-2011, 02:14 PM
No, there is no difference. echo and print are the same thing.

mlseim
09-20-2011, 02:15 PM
I find different answers, but this seems like the best explanation:
http://www.jonlee.ca/php-tidbit-echo-vs-print/


.

tangoforce
09-20-2011, 02:23 PM
Actually that article is wrong.

If you look at print (http://uk3.php.net/print) on the php website, take a look at return values:



Returns 1, always.

Democrazy
09-20-2011, 02:30 PM
Thank you, mlseim.

Wanna
09-20-2011, 02:53 PM
Echo has a shortcut to use it: <?=$var?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum