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; } You would definitely need to put it into quotes (as I have above) For newer versions of PHP, you would also want register globals off, and thus you would probably want to use $_GET['action'] as I have above. If you are using OLD PHP, then use HTTP_GET_VARS instead. 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: Martin Hudec [mailto:[EMAIL PROTECTED]] Sent: 21 November 2002 02:11 PM To: PHP Subject: [PHP] character ' in switch Hello all, I would like to know how can I put ' character to case in switch... Situation: from flash i am getting url: index.php?action=what's new i need to pass this thing to switch like: switch ($action) { case about: code break; case what's new: <-- i want this... code break; default: break; } but PHP can't use '....i am thinking about making urlencode() to put that character to %XX value.... any advices? -- Best regards, Martin mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
smime.p7s
Description: application/pkcs7-signature