Bluehost.com Web Hosting $6.95

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

This is a discussion on RE: [PHP] Code optimization: single vs. double quotes? within the PHP General forums, part of the PHP Programming Forums category; Justin French <mailto:justin@indent.com.au> on Friday, October 24, 2003 12:57 AM said: > I ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-24-2003
Chris W. Parker
 
Posts: n/a
Default RE: [PHP] Code optimization: single vs. double quotes?

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\'>&nbsp;</td></tr>';


Even better (and valid HTML too!):

echo '<td bgcolor="#ffffff">&nbsp;</td></tr>';


I've always been a big fan of:

> echo "<td bgcolor=\"$bgcolor2\">&nbsp;</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/
Reply With Quote
  #2 (permalink)  
Old 10-25-2003
Olinux
 
Posts: n/a
Default RE: [PHP] Code optimization: single vs. double quotes?

--- "Chris W. Parker" <cparker@swatgear.com> wrote:
>
> I've always been a big fan of:
>
> > 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.

olinux


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 03:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0