I know this is a very newbie question, but I cannot understand the difference between echo and return in a function, and how 'return' affects a function!
Asked
Active
Viewed 22 times
0
-
1Well with `echo` you print something out, while with `return` you just return something from a function and then you can do whatever you want with the returned value. – Rizier123 Jan 19 '17 at 00:51
-
manual seems clear: http://php.net/manual/en/function.return.php – Jan 19 '17 at 00:51
-
@Fred-ii- There is even a dupe for that lol. There is really a dupe for everything :) – Rizier123 Jan 19 '17 at 00:55
-
There sure is @Rizier123 well, pretty much ;-) – Funk Forty Niner Jan 19 '17 at 02:04
-
@Rizier123 TBH, here are the keywords I used in Google: "what is echo and return in php?" *lol* go figure, eh? – Funk Forty Niner Jan 19 '17 at 02:10