When should I use print instead of echo in PHP?

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-04-23T06:12:59Z Indexed on 2010/04/23 6:23 UTC
Read the original article Hit count: 208

Filed under:
|
|

I understand that echo is slightly faster, and print can be used as a function, but I've been reading an e-book on PHP, and the writer is using print, instead of echo, to output very simple text.

print "Your name is $name\n";

So my question is, when would it be appropriate for me to use print as opposed to echo?

© Stack Overflow or respective owner

Related posts about php

Related posts about print