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
  [EMAIL PROTECTED]




""scott [gts]"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 20, 2001 12:23 PM
> > To: [EMAIL PROTECTED]
> > 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: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to