--%>

Differentiate echo and print statement

Differentiate between echo and print statement?

E

Expert

Verified

i) echo() and print() are language constructs in PHP, both the statements are used to output strings. Speed of both the statements is almost same.

ii) echo() can take multiple expressions whereas print() cannot take multiple expressions.

iii) Print return true or false based on success or failure whereas echo doesn't return true or false.

   Related Questions in PHP Web Programming