Friday 16 April 2010

What is the difference between echo and print statement?

There is a slight difference between print and echo which would depend on how you want to use the outcome. Using the print method can return a true/false value.

This may be helpful during a script execution of somesort.
Echo does not return a value, but has been considered as a faster executed command.
All this can get into a rather complicated discussion, so for now, you can just use whichever one you prefer.

Cheers!

No comments:

Post a Comment