RE: [PHP] General Coding Question

From: Date: Thu, 21 Jun 2001 07:31:22 +0000
Subject: RE: [PHP] General Coding Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-54696@lists.php.net to get a copy of this message
I don’t think that’s XHTML complient... Correct me if im wrong? -----Original Message----- From: Chris Lee [mailto:lee@mediawaveonline.com] Sent: 20 June 2001 23:50 To: php-general@lists.php.net Subject: Re: [PHP] General Coding Question im here to start a flamewar. dont use " then. why not use ' ? echo " <input type=\"text\" name=\"name\" value=\"$name\"> " echo " <input type='text' name='name' value='$name'> " I like the second. it is proper html check it with w3.org. -- Chris Lee lee@mediawaveonline.com ""scott [gts]"" <scott@graphictype.com> wrote in message news:KFEKLFMNHDILCMFAEKJCIEDKCLAA.scott@graphictype.com... > on pages with mostly HTML code, the second style is much prefereable, > but on pages with mostly PHP code, the first style is usually OK. > > overall, i tend towards the second, becuase it's a pain > in the ass to esape all the double-quotes in my HTML, > my echo statements usulaly end up looking like thi > (which, to me, is terrible form) > > echo "<INPUT TYPE=\"TEXT"\" VALUE=\"". $hash['var'] > ."\"...... > > so i usually use this format, which to my eyes > is much prettier :) > ?> > <INPUT TYPE="TEXT" VALUE="<?= $hash['var'] ?>"> > <? > > > -----Original Message----- > > From: James Stevens [mailto:jstevens@endeavors.com] > > Sent: Wednesday, June 20, 2001 12:23 PM > > To: php-general@lists.php.net > > Subject: [PHP] General Coding Question > > > > > > Does it have any effect on performance in either case if a file is > > completely done in PHP(1) or interspersed with PHP(2). > > > > (1) > > <?php > > echo "<html>"; > > ... > > ?> > > > > (2) > > <html> > > ... > > <?php echo $forminput; ?> > > ... > > > > Also, and this is personal preference, which is easier to > > read/debug? > > > > James > > > > > > -- > > 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 > > > > -- > 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 > -- 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 (#54696) next »