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

2003-10-27 Thread Chris W. Parker
olinux mailto:[EMAIL PROTECTED] 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

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

2003-10-27 Thread Jay Blanchard
[snip] echo td bgcolor=\$bgcolor2\nbsp;/td/tr; uggh - redesign recommend? [/snip] CSS! :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2003-10-27 Thread Chris W. Parker
Jay Blanchard mailto:[EMAIL PROTECTED] on Monday, October 27, 2003 9:31 AM said: CSS! :) Oh that's what he meant? I thought he was talking about the quoting style used on that line. Chris. p.s. The last time I actually used bgcolor was probably almost a year ago. :) -- Don't like

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

2003-10-27 Thread Justin French
On Tuesday, October 28, 2003, at 04:29 AM, Chris W. Parker wrote: olinux mailto:[EMAIL PROTECTED] 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,

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

2003-10-27 Thread Chris W. Parker
Justin French mailto:[EMAIL PROTECTED] on Monday, October 27, 2003 2:12 PM said: 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; Exactly what is the problem

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

2003-10-27 Thread Chris Shiflett
--- Justin French [EMAIL PROTECTED] wrote: a) echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; The curly braces are superfluous here, since you are using double quotes. I'm not sure if you like having them there, but I think that less syntax yields a simpler and cleaner appearance. However, I hate

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

2003-10-27 Thread Chris W. Parker
Chris Shiflett mailto:[EMAIL PROTECTED] on Monday, October 27, 2003 2:30 PM said: --- Justin French [EMAIL PROTECTED] wrote: a) echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; The curly braces are superfluous here, since you are using double quotes. I'm not sure if you like having them there,

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

2003-10-27 Thread Chris Shiflett
--- Chris W. Parker [EMAIL PROTECTED] wrote: Exactly what is the problem with: echo td bgcolor=\$bgcolor2\nbsp;/td/tr; I don't see the problem. I agree with you, actually. The only things I don't like are: 1. The use of the bgcolor attribute 2. The name of the variable :-) 3. The fact

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

2003-10-27 Thread Curt Zirzow
* Thus wrote Chris Shiflett ([EMAIL PROTECTED]): --- Chris W. Parker [EMAIL PROTECTED] wrote: Exactly what is the problem with: echo td bgcolor=\$bgcolor2\nbsp;/td/tr; I don't see the problem. I agree with you, actually. The only things I don't like are: 1. The use of the

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

2003-10-27 Thread DvDmanDT
It's said that you shouldn't use tables for layout, but does people accutually listen to that? And what instead? -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com ## Please, if you are using windows, you may be infected by Swen. Please go here to find out

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

2003-10-27 Thread Mike Migurski
It's said that you shouldn't use tables for layout, but does people accutually listen to that? And what instead? This is veering off-topic, but: http://css-discuss.incutio.com/?page=CssLayouts - michal migurski- contact info and

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

2003-10-27 Thread Chris W. Parker
Curt Zirzow mailto:[EMAIL PROTECTED] on Monday, October 27, 2003 3:16 PM said: 5. no newline after the tr. :) There are some broswer issues with tr and td's not being on the same line. Ok I resisted sending this earlier but it appears it is now necessary. ;) Here is how I WOULD have

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

2003-10-27 Thread Chris Shiflett
--- DvDmanDT [EMAIL PROTECTED] wrote: It's said that you shouldn't use tables for layout, but does people accutually listen to that? And what instead? You can use stylesheets. These work well with PHP. Well, that's my attempt at getting this thread back on topic. :-) Chris = My Blog

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

2003-10-27 Thread Chris Shiflett
--- Chris W. Parker [EMAIL PROTECTED] wrote: p.s. And yes Curt you touched on why I put my td/td's all on one line. Some browsers (I know IE does) like to add whitespace if the td and /td are not all on the same line. Which is why I didn't complain about that. :-) You had your closing tr on

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

2003-10-27 Thread Justin French
On Tuesday, October 28, 2003, at 09:23 AM, Chris W. Parker wrote: Exactly what is the problem with: echo td bgcolor=\$bgcolor2\nbsp;/td/tr; it's purely personal -- i don't enjoy writing, re-writing, debugging or modifying code with 100's of escaped double quotes everywhere when they really

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

2003-10-27 Thread Justin French
On Tuesday, October 28, 2003, at 09:29 AM, Chris Shiflett wrote: --- Justin French [EMAIL PROTECTED] wrote: a) echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; The curly braces are superfluous here, since you are using double quotes. I'm not sure if you like having them there, but I think that less

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

2003-10-24 Thread Nathan Taylor
for the new line character. Horizontal Tab - define(T, chr(9)); New Line - define(NL, chr(10)); Cheers, Nathan - Original Message - From: Robert Cummings To: Shawn McKenzie Cc: PHP-General Sent: Thursday, October 23, 2003 10:30 PM Subject: Re: [PHP] Code optimization: single vs

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

2003-10-24 Thread Justin French
On Friday, October 24, 2003, at 10:43 AM, Shawn McKenzie wrote: For example it is better to code: Code: echo 'td bgcolor='.$bgcolor2.'nbsp;/td/tr'; vs. Code: echo td bgcolor=\$bgcolor2\nbsp;/td/tr; Better is a very loose term, but I've adopted a coding style which uses

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

2003-10-24 Thread Richard Baskett
10:30 PM Subject: Re: [PHP] Code optimization: single vs. double quotes? On Thu, 2003-10-23 at 20:43, Shawn McKenzie wrote: I came across this post and was hoping to get a gurus opinion on the validity. TIA -Shawn I remember reading somewhere re: PHP coding that it is a better coding

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

2003-10-24 Thread Joachim Krebs
Message - From: Robert Cummings To: Shawn McKenzie Cc: PHP-General Sent: Thursday, October 23, 2003 10:30 PM Subject: Re: [PHP] Code optimization: single vs. double quotes? On Thu, 2003-10-23 at 20:43, Shawn McKenzie wrote: I came across this post and was hoping to get a gurus opinion

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

2003-10-24 Thread olinux
No special chars or vars: echo 'td bgcolor=\'#ff\'nbsp;/td/tr'; For cases with vars and special chars, I think these look terrible: echo 'td bgcolor='.$bgcolor2.'nbsp;/td/tr'; I'm a fan of this style - works great with syntax highlighting in homesite. olinux echo td

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

2003-10-24 Thread Robert Cummings
On Fri, 2003-10-24 at 03:57, Justin French wrote: On Friday, October 24, 2003, at 10:43 AM, Shawn McKenzie wrote: [--CLIPPETY CLIP CLIP--] Whereas this is clear and easy to work with: echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; Unless your $bgcolor2 variable has double quotes in it, then

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

2003-10-24 Thread Chris W. Parker
Justin French mailto:[EMAIL PROTECTED] 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

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

2003-10-24 Thread Marek Kilimajer
Robert Cummings wrote: echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; Unless your $bgcolor2 variable has double quotes in it, then the above is poor HTML style. I don't think omission of double quotes has been considered valid HTML since version 3 (admittedly though, as long as they let it render,

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

2003-10-24 Thread Robert Cummings
On Fri, 2003-10-24 at 12:03, Marek Kilimajer wrote: Robert Cummings wrote: echo td bgcolor='{$bgcolor2}'nbsp;/td/tr; Unless your $bgcolor2 variable has double quotes in it, then the above is poor HTML style. I don't think omission of double quotes has been considered valid HTML since

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

2003-10-24 Thread olinux
--- Chris W. Parker [EMAIL PROTECTED] 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

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

2003-10-23 Thread Jordan S. Jones
I remember reading something very very similar from one of the main php developers.. However, for the life of me, I can't remember where it was exactly... Jordan S. Jones Shawn McKenzie wrote: I came across this post and was hoping to get a gurus opinion on the validity. TIA -Shawn I

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

2003-10-23 Thread Robert Cummings
On Thu, 2003-10-23 at 20:43, Shawn McKenzie wrote: I came across this post and was hoping to get a gurus opinion on the validity. TIA -Shawn I remember reading somewhere re: PHP coding that it is a better coding practice to use single quotes as much as possible vs. using double quotes in