Re: mixing HTML and PHP code

From: Date: Fri, 12 Jan 2001 08:03:42 +0000
Subject: Re: mixing HTML and PHP code
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-34218@lists.php.net to get a copy of this message
Alex Black wrote: > echo "<input type=\"text\" name=\"hello\" size=\"20\" > value=\"$value\">" > > starts to make you insane. If it is done wrong spread over the whole project hidden between lines of PHP-code, it sure does. > speaking as an html author, and a lover of php, _please_: > > <input type="text" name="hello" size="20" > value="<?=$value?>"> > > it makes the code useable. 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 -- Sanity is calming, but madness is more interesting.

« previous php.general (#34218) next »