RE: [PHP] mixing HTML and PHP code

From: Date: Wed, 10 Jan 2001 23:35:56 +0000
Subject: RE: [PHP] mixing HTML and PHP code
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-33844@lists.php.net to get a copy of this message
Brian Clark ... > > Hello Alexander, > > (AW == "Alexander Wagner") wagner@globalpark.de writes: > > >> Mmmmppppfff... ultraedit's wordlist file still lacks the color of > >> allaire's homesite - it does detect which parts of the .php file > >> are HTML and what parts of the file are PHP code, and colours > >> syntax very well... > > AW> Who needs that? Nesting PHP in HTML is bad style, IMHO. > > Bad style?! > > You _actually_ print() or echo() everything you want to send to the > browser? > > If it doesn't need to be interpolated by PHP, why print() it? Well, sometimes (IMHO), the better way to keep things readable is to include() things, such as include "page_header.php" , include "lateral_links.php" , include "page_footer.php" , and so on... Damn, my pages look so professional including everything... the final client-side html page is huge but the main PHP is so simple and structured... And, what i was going to say, if you wanna mix HTML and PHP code, perhaps the way you want is to include(), print() and echo() all the HTML and let everything in PHP code... Of course, i'm meaning of including() HTML files (without any PHP code).

« previous php.general (#33844) next »