Re: print vs. echo
| From: | The Doctor What | Date: | Thu, 17 Aug 2000 14:43:21 +0000 |
| Subject: | Re: print vs. echo | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-12236@lists.php.net to get a copy of this message | ||
* Radek Vybiral (Radek.Vybiral@vsb.cz) [000817 04:01]:
> User contributed notes in manual:
>
> The print() function returns a boolean indicating the status of the call.
> If the write was successful, print() returns 1. If not, it
> returns 0. This can be used to detect when the client has closed the
> connection, and appropriate measures taken. The builtin echo does not
> provide this same service.
echo provides a nice multi-line feature, too:
echo "foo foo",
" more foo more foo...";
(Don't use parentheses for echo for multi-line: echo ("foo foo",
.... is bad)
I could have sworn an earlier version of the docs said print was an
alias for echo, though.
Ciao!
--
Digital circuits are made from analog parts.
-- Don Vonada
The Doctor What: A Holtje Production http://docwhat.gerf.org/
docwhat@gerf.org KF6VNC