Re: Code optimization: single vs. double quotes?

From: Date: Mon, 27 Oct 2003 22:11:45 +0000
Subject: Re: Code optimization: single vs. double quotes?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167798@lists.php.net to get a copy of this message
On Tuesday, October 28, 2003, at 04:29 AM, Chris W. Parker wrote:
olinux <mailto:olnx@yahoo.com>
    on Friday, October 24, 2003 9:41 PM said:
echo "<td bgcolor=\"$bgcolor2\">&nbsp;</td></tr>";
uggh - apparently you've never had to redesign a site/application that uses this style. This is one table cell, but when you work this style through a big app, it's a huge pain (waste of time) to make any changes.
Apparently. What do you recommend?
You have plenty of options... a & b would be my preference: a) echo "<td bgcolor='{$bgcolor2}'>&nbsp;</td></tr>"; b) echo "<td bgcolor='$bgcolor2'>&nbsp;</td></tr>"; c) echo '<td bgcolor="'.$bgcolor2.'">&nbsp;</td></tr>'; d) echo "<td bgcolor='".$bgcolor2."'>&nbsp;</td></tr>"; Justin French

« previous php.general (#167798) next »