Difference between echo and return in php? -


this confusing me ,what difference between echo , return, in functions

echo outputs content console or web browser.

example:

echo "hey, showing on screen!"; 

return returns value @ end of function or method.

example:

function my_function() {     return "always returns this"; }  echo my_function(); // displays "always returns this" 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -