Re: print vs. echo

From: Date: Thu, 17 Aug 2000 14:58:38 +0000
Subject: Re: print vs. echo
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-12242@lists.php.net to get a copy of this message
You can also use a similar syntax like this $var = "even variables"; echo " <table> <tr> <td> Print something inside the table $var </td> </tr> <table> "; This helps keep HTML syntax nice and simple. Just for the record, I am going to run some benchmark tests to see which output function performs best and test them under different platforms such as NT vs Unix and PHP vs ASP. I'll post them to www.databasewatch.com when I've got some results. Cheers, Andy ----- Original Message ----- From: "The Doctor What" <docwhat@gerf.org> To: <php-general@lists.php.net> Sent: Thursday, August 17, 2000 3:43 PM Subject: Re: [PHP] print vs. echo > * 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#12242) next »