NYCPHP Meetup

NYPHP.org

[nycphp-talk] Stupid Question - difference between using single and double quotes

Michael Southwell southwell at dneba.com
Mon Mar 29 16:19:20 EST 2004


At 11:53 AM 3/29/2004, you wrote:
>If you're like me and also concerned with your own efficiency (and
>supporting your general laziness), there's also the benefit of not having
>to escape quotes within single quotes or single quotes within quotes:
>
>$foo = "This doesn't require escaping.";
>$bar = '"Cool," said Chris.';

One disadvantage, however, is that these single and double quotation marks 
display as typewriter style (that is, straight).  If you want typeset style 
(that is, curved, as in a book) single and double quotation marks, you need 
to do something like this:
$foo = "This doesn’t require escaping.";
$bar = '“Cool,” said Chris.';

This, however, is further dependent on font and (I believe) font size; 
sometimes there is no apparent difference between the typewriter and 
typeset styles as displayed.  An example of this is on the various 
PHundamentals articles, where I am in the habit of using the typeset ones 
and Jeff Siegel is in the habit of using either the keyboard symbols or 
"--but they all look the same.

But now we are getting really OT and onto aesthetics.


Michael G. Southwell =================================
DNEBA Enterprises
81 South Road
Bloomingdale, NJ 07403-1419
973/492-7873 (voice and fax)
southwell at dneba.com
http://www.dneba.com
======================================================




More information about the talk mailing list