Output - echo()

Posted by Whiz
void echo (string argument1 [, ...string argumentN])
The echo() statement operates similarly to print(), except for two differences. First, it cannot
be used as part of a complex expression because it returns void, whereas print() returns a
Boolean. Second, echo() is capable of outputting multiple strings. The utility of this particular
trait is questionable; using it seems to be a matter of preference more than anything else.
Nonetheless, it’s available should you feel the need. Here’s an example:
$heavyweight = "Lennox Lewis";
$lightweight = "Floyd Mayweather";
echo $heavyweight, " and ", $lightweight, " are great fighters.";
?>

0 Response to 'Output - echo()'

Post a Comment