RE: [PHP] PHP vs. PERL (Functional Comparison)??

From: Date: Mon, 17 Sep 2001 04:31:03 +0000
Subject: RE: [PHP] PHP vs. PERL (Functional Comparison)??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67562@lists.php.net to get a copy of this message
hallelujah...first time i've seen someone else mention here docs, and being rasmus, not a bad person to make the mention ;-) -----Original Message----- From: Rasmus Lerdorf [mailto:rasmus@php.net] Sent: Monday, September 17, 2001 12:17 AM To: speedboy Cc: php-general@lists.php.net Subject: Re: [PHP] PHP vs. PERL (Functional Comparison)?? > > ie. don't necessarily use 1 file per block, create functions that are > > defined in a single file and call those instead of including a new file. > > How do you echo your html, do you put the html in your functions and > escape the double quotes? There is some extra load there echoing all the > html? echo HTML? I do this: <? php stuff..?> HTML stuff <? more php stuff ?> I drop out of PHP mode to display raw HTML. If I have a lot of HTML with a lot of PHP variables tossed in, I do: <? $test = 'test'; $one = 'one'; echo <<<EOF This is a $test. And here is another $one. EOF; ..more php code... ?> Or sometimes simply: HTML stuff <?=$variable?> and some more HTML stuff. -Rasmus -- 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 (#67562) next »