0
What's the difference between ECHO and RETURN ?
2 Answers
+ 2
ECHO: the content is written on the screen from inside the function.
RETURN: the function writes nothing but returns a value to wherever it was called from.
In these examples for beginners, the values that the function RETURNED are then ECHOed to make them visible, this makes them look similar, but functions are much more powerful, as I'm sure we'll see in later lessons.
cheers
0
Echo is for display, while return is used to store a value, which may or may not be used for display or other use.