Wednesday, November 18, 2009

What is the difference between echo and print statement?

Both echo and print are language constructs.

However print() acts like a function in that it returns a value and can be used in complex expressions.

Furthermore echo without parentheses can take multiple arguments. Echo with parentheses and print can only take a single argument.

No comments: