RE: [PHP] Code optimization: single vs. double quotes?
| From: | Chris W. Parker | Date: | Fri, 24 Oct 2003 15:55:28 +0000 |
| Subject: | RE: [PHP] Code optimization: single vs. double quotes? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-167444@lists.php.net to get a copy of this message | ||
Justin French <mailto:justin@indent.com.au>
on Friday, October 24, 2003 12:57 AM said:
> I also adapted wrapping all variables in {parenthesis} so that PHP has
> no chance of being confused
heh... actually those are {curly braces} and these are (parenthesis).
> No special chars or vars:
> echo '<td bgcolor=\'#ffffff\'> </td></tr>';
Even better (and valid HTML too!):
echo '<td bgcolor="#ffffff"> </td></tr>';
I've always been a big fan of:
> echo "<td bgcolor=\"$bgcolor2\"> </td></tr>";
But this has been an interesting topic so I might just start changing my
style.
Chris.
p.s. If you're wondering how heredoc fits into all of this, it's really
slow.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/