Hi Ernest,

I stand corrected. (I tend to standardise on double quotes where
possible, and rarely use singles)

Thanks for correcting me on this.

Thanks

David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
e-mail: [EMAIL PROTECTED]
web: www.BarloworldOptimus.com

-----Original Message-----
From: Ernest E Vogelsinger [mailto:[EMAIL PROTECTED]] 
Sent: 21 November 2002 02:59 PM
To: David Russell
Cc: 'Martin Hudec'; 'PHP'
Subject: RE: [PHP] character ' in switch


At 13:16 21.11.2002, David Russell spoke out and said:
--------------------[snip]--------------------
>Hi Martin,
>
>Just a thought - can't you escape it?
>
>switch ($_GET['action']) {
>       case "about":
>       code
>       break;
>
>       case "what\'s new": <-- i want this...
>       code
>       break;
>
>       default:
>       break;
>}
--------------------[snip]-------------------- 

You need to escape a quote if it's in a string that is quoted with the
same
quote:
   "Double quoted string needs to \"escape\" double quotes but not
'single quotes'"
   'Single quoted string needs not to "escape" double quotes but
\'single quotes\'"


-- 
   >O Ernest E. Vogelsinger 
   (\) ICQ #13394035 
    ^ http://www.vogelsinger.at/

Attachment: smime.p7s
Description: application/pkcs7-signature

Reply via email to