Re: 'Pure' php vs 'mixed' (html + php)

From: Date: Mon, 03 Jun 2002 14:30:35 +0000
Subject: Re: 'Pure' php vs 'mixed' (html + php)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-100398@lists.php.net to get a copy of this message
On Dom 02 Jun 2002 21:45, David Freeman wrote: > > I've noticed that many people on the list code in 'pure' php, i.e. > > > > <? > > print "<input type='text' name='fname' > > size='50'>"; > > > > // etc > > ?> > > Personally, it depends on what I'm doing. I find that excessive use of > <? And ?> in my code gets distracting so if I need a lot of php code I > will usually put the straight html into echo/print strings. If I'm > doing something that is predominantly html with only a few php variables > or some such then I'll do it mostly in html. > > Often if there's just a php code block I'll move it into an include and > then just include it in normal html. This helps readability and lets me > separate some of the layout aspects from the code logic aspects. > > In the end if it's valid it will work. My only real decision is based > on readability for my own purposes. See the HTML template class that comes with PEAR! Saludos... :-) -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------

« previous php.general (#100398) next »