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 Monday, October 27, 2003 2:12 PM said: > a) ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Justin French <mailto:justin@indent.com.au>
on Monday, October 27, 2003 2:12 PM said: > a) echo "<td bgcolor='{$bgcolor2}'> </td></tr>"; > b) echo "<td bgcolor='$bgcolor2'> </td></tr>"; > c) echo '<td bgcolor="'.$bgcolor2.'"> </td></tr>'; > d) echo "<td bgcolor='".$bgcolor2."'> </td></tr>"; Exactly what is the problem with: echo "<td bgcolor=\"$bgcolor2\"> </td></tr>"; I don't see the problem. Chris. -- Don't like reformatting your Outlook replies? Now there's relief! http://home.in.tum.de/~jain/software/outlook-quotefix/ |
|
|||
|
--- "Chris W. Parker" <cparker@swatgear.com> wrote:
> Exactly what is the problem with: > > echo "<td bgcolor=\"$bgcolor2\"> </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 that your td is not tabbed in 4. The closing tr being on the same line But, everyone has different tastes. I tend to choose whichever format makes my HTML look perfect while requiring the least amount of syntax in PHP. Chris ===== My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp |
|
|||
|
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 more: http://us.mcafee.com/virusInfo/defau...er&hcName=swen http://securityresponse.symantec.com...swen.a@mm.html ########################## "Curt Zirzow" <php-general@zirzow.dyndns.org> skrev i meddelandet news:20031027231614.GM51024@bagend.shire... > * Thus wrote Chris Shiflett (shiflett@php.net): > > --- "Chris W. Parker" <cparker@swatgear.com> wrote: > > > Exactly what is the problem with: > > > > > > echo "<td bgcolor=\"$bgcolor2\"> </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 that your td is not tabbed in > > 4. The closing tr being on the same line > > > > But, everyone has different tastes. I tend to choose whichever format makes my > > HTML look perfect while requiring the least amount of syntax in PHP. > > 5. no newline after the tr. :) > > There are some broswer issues with tr and td's not being on the > same line. But I guess that shouldn't matter much cause tables > shouldn't be used for layout design. > > > Curt > -- > "My PHP key is worn out" > > PHP List stats since 1997: > http://zirzow.dyndns.org/html/mlists/ |
|
|||
|
* Thus wrote Chris Shiflett (shiflett@php.net):
> --- "Chris W. Parker" <cparker@swatgear.com> wrote: > > Exactly what is the problem with: > > > > echo "<td bgcolor=\"$bgcolor2\"> </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 that your td is not tabbed in > 4. The closing tr being on the same line > > But, everyone has different tastes. I tend to choose whichever format makes my > HTML look perfect while requiring the least amount of syntax in PHP. 5. no newline after the tr. :) There are some broswer issues with tr and td's not being on the same line. But I guess that shouldn't matter much cause tables shouldn't be used for layout design. Curt -- "My PHP key is worn out" PHP List stats since 1997: http://zirzow.dyndns.org/html/mlists/ |
|
|||
|
>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 pgp key: sf/ca http://mike.teczno.com/contact.html |
|
|||
|
--- DvDmanDT <dvdmandt@telia.com> 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 http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp |
|
|||
|
On Tuesday, October 28, 2003, at 09:23 AM, Chris W. Parker wrote:
> Exactly what is the problem with: > > echo "<td bgcolor=\"$bgcolor2\"> </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 aren't needed. Justin |