Re: quotes on attributes (was Re: Unwanted space and quoting attributes)
by Nathan Young <nyoung(at)asis.com>
|
| Date: |
Tue, 04 Mar 2003 15:24:36 -0800 |
| To: |
Liz Bartlett <khyri(at)idyllmtn.com>, hwg-critique(at)hwg.org, TjL <luomat(at)operamail.com> |
| In-Reply-To: |
operamail |
| |
todo: View
Thread,
Original
|
|
Not to beat this to death completely, but you can often use the php script
end and start tags as inverted quotes so that:
print ('<a href="' . $url . '">This link</a>');
becomes:
?><a href="<?=$url?>">This link</a><?php
This has a big added advantage if you (or someone else on your team) work(s)
with the code in dreamweaver. The print statement would hide its content
from dreamweaver, whereas dreamweaver can see the content in the second
example just fine. For a simple link it may not matter, but for things like
table tags it matters a lot; it can mean the difference of being able to work
with the page in a visual editor versus not.
---->N
>I know this isn't a PHP list, but you can make this a tiny bit easier and
>more efficient by using single quotes instead of double.
>
>
>
>When PHP sees double quotes as part of its commands, it looks for
>variables. As long as there are no variables, you can gain a (miniscule)
>bit of processing, but more importantly you don't have to escape your "
>
>FYI/HTH
>
>TjL
>
>
>
>
>
>
---
(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*
(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*(([^/]+)/([^/]+)){0,1}/*
---
Nathan Young
N. C. Young Design
(530)629-4176
http://ncyoung.com
HTML: hwg-critique mailing list archives,
maintained by Webmaster @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.