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
Hi Martin,
I would like to know how can I put ' character to case in switch...
switch ($action) {
case about:
code
break;
case what's new: -- i want this...
code
break;
Try wrapping the cases in quotes:
switch ($action) {
case about:
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
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;
: 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
5 matches
Mail list logo