What is the difference between the three?
return, echo and print keyword in PHP
function theBand($abc,$bac) {
return $abc;
echo $abc;
}
Both do the same thing, it shows or returns to me the value contained in the variable abc. Now the function returns and the echo continues. In addition, there is something specific with the return keyword.
Kevin source
share