Difference between echo and return in php?

php

Solution

`echo` outputs content to the console or the web browser.

Example:

echo "Hey, this is now showing up on your screen!";

`return` returns a value at the end of a function or method.

Example:

function my_function()
{
    return "Always returns this";
}

echo my_function(); // displays "Always returns this"

Problem

This so confusing me ,What is the difference between the echo and return, in functions

Original source