View Single Post
Old 04-18-2009, 11:32 PM   #1 (permalink)
allworknoplay
The Gregarious
 
allworknoplay's Avatar
 
Join Date: Feb 2009
Location: New York
Posts: 645
Thanks: 64
allworknoplay is on a distinguished road
Default print() vs echo()

Hey guys, I wanted to provide this description of print and echo.
Not my words...


Quote:
Even though print() and echo() are essentially interchangeable most of the time, there is a
substantial difference between them. While print() behaves like a function with its own
return value (although it is a language construct), echo() is actually a language construct that
has no return value and cannot, therefore, be used in an expression.

However, I can't think of any possible uses where I can't use one and not the other.

Can anyone provide an example of using print() in an expression where you can't with echo()??

TIA....
allworknoplay is offline  
Reply With Quote