RE: [PHP] character ' in switch

2002-11-21 Thread David Russell
: 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:

RE: [PHP] character ' in switch

2002-11-21 Thread Ernest E Vogelsinger
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 >

RE: [PHP] character ' in switch

2002-11-21 Thread David Russell
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)

RE: [PHP] character ' in switch

2002-11-21 Thread Jon Haworth
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 "