Re: mixing HTML and PHP code

From: Date: Fri, 12 Jan 2001 18:13:19 +0000
Subject: Re: mixing HTML and PHP code
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-34277@lists.php.net to get a copy of this message
> No. > > <input type="text" name="hello" size="20" > value="{value}"> > > makes the code usable, and your HTML can even be edited with a > graphical HTML-editor. > > There is no reason to mix up HTML and PHP, except for very small > projects. > > regards > Wagner and the problem with that, is you're not paring tons of html through a search-replace function, which also created unnecessary overheead, and forces you (once again) to make a spec that says "here's how this template system works) part of the point was for _PHP_ to be embedded html, in my opinion your example above takes the "don't mix logic with markup" much too far: <input type="text" name="hello" size="20" value="<?=$value?>"> is really not that much harder to write. html people can ignore it, php can find their code, and those that know both can reap the benefits. what about loops? etc... you start building your own little template language constructs, which is dumb because php already has them! :) _alex -- Alex Black, Head Monkey enigma@turingstudio.com The Turing Studio, Inc. http://www.turingstudio.com vox+510.666.0074 fax+510.666.0093 Saul Zaentz Film Center 2600 Tenth St Suite 433 Berkeley, CA 94710-2522

« previous php.general (#34277) next »