RE: [PHP] character ' in switch

From: Date: Thu, 21 Nov 2002 12:14:40 +0000
Subject: RE: [PHP] character ' in switch
Groups: php.general 
Request: Send a blank email to php-general+get-125398@lists.php.net to get a copy of this message
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": code break; case "what's new": code break; } HTH Jon

« previous php.general (#125398) next »