note 31800 added to control-structures.switch

From: Date: Sun, 04 May 2003 07:50:52 +0000
Subject: note 31800 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-47487@lists.php.net to get a copy of this message
You can also nest switch statements inside case statements: // Set argument handlers $argv = explode(",", urldecode(getenv('QUERY_STRING'))); $argc = array_shift($argv); $argd = array_shift($argv); $arge = array_shift($argv); // Begin switching switch ($argc) { case 'home': { print('This is $argc, home case.'); break; } case 'subsection': { switch ($argd) { case 'links': { switch($arge) { case 'display': { print('This is $arge, subsection,links,display case.'); break; } } } } } } -- http://www.php.net/manual/en/control-structures.switch.php http://master.php.net/manage/user-notes.php?action=edit+31800 http://master.php.net/manage/user-notes.php?action=delete+31800 http://master.php.net/manage/user-notes.php?action=reject+31800

« previous php.notes (#47487) next »