note 53477 deleted from control-structures.continue by nlopess

From: Date: Thu, 02 Jun 2005 18:17:21 +0000
Subject: note 53477 deleted from control-structures.continue by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-89825@lists.php.net to get a copy of this message
Note Submitter: edmund at haselwanter dot com ---- Comment to note from "njones at fredesign dot company": The continue for the switch works as expected, it skips the rest of the switch statement. With your example code you won't see something meaningful since you don't "exercise" this behaviour. <?php $names = array("Mike", "Mary", "Jose", "Anna"); foreach ($names as $kid) { echo "before switch for $kid \n"; switch($kid) { case "Mike": continue; echo "Case Mike\n"; break; case "Jose": echo "Case Jose\n"; case "Anna": echo "Case Anna\n"; } echo "after switch for $kid \n"; } ?>

« previous php.notes (#89825) next »