Re: [PHP] Code optimization: single vs. double quotes?

From: Justin French (justin_at_indent.com.au)
Date: 10/27/03


Date: Tue, 28 Oct 2003 09:11:45 +1100
To: "Chris W. Parker" <cparker@swatgear.com>

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



Relevant Pages

  • Re: Excel hangs
    ... Yup there is quite a lot more to the app - as described in the original post ... the cell F10 is another test cell. ... step over the line and autocalc seems to kick in and bang - dead. ... Also I think you may try to post the Debug.print in the loop. ...
    (microsoft.public.excel.programming)
  • Re: Runtime and MDAC problem
    ... Thanks Chris! ... I'm just trying to install a miserable 1.300 euros ... The Windows Runtime application "opens" requesting the app password, ... wait for MS reaction, call Gates on his mob ?? ...
    (microsoft.public.access.developers.toolkitode)
  • Buggy Datagridview?
    ... I and another developer have created an app that uses a datagridview to ... display market information. ... As soon as a new value is written to the cell it also cures both of these ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: BitBlt failing under XP with a locked screen saver
    ... HDESK threaddesktop = GetThreadDesktop); ... thread would change desktops just because a locked screen saver starts. ... It looks like the same problem with Chris. ... > One possible resolution is to catch and ignore this error in your app. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: WebResponse.Close() not disposing unmanaged resource?
    ... Hi Chris, ... > and it appears to be leaking memory. ... > wrote this code in a test app to try duplicating ... Checking the profiler, I ...
    (microsoft.public.dotnet.framework)