note 88359 added to control-structures.switch

From: Date: Wed, 21 Jan 2009 09:44:22 +0000
Subject: note 88359 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-149578@lists.php.net to get a copy of this message
switch isn't working for me at all. My website is setup using switch, but when I put all the files on my other webhost, the switch doesn't function at all. The only difference is the version of PHP that is running. The server where the switch works, is running PHP 4.4.2 The server where the switch doesn't work is running PHP 5.2.5 I've also tried on my laptop running the newest apache and php, but switch still doesn't work. Here's a bit of code I am using: <?php switch($id) { case 'a': echo 'case is a'; break; case 'b': echo 'case is b'; break; case 'c': echo 'case is c'; break; case 'd': echo 'case is d'; break; default: echo 'default'; } ?> ---- Server IP: 64.71.164.2 Probable Submitter: 99.170.64.244 ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- https://master.php.net/note/edit/88359 Del: integrated -- https://master.php.net/note/delete/88359/integrated Del: useless -- https://master.php.net/note/delete/88359/useless Del: bad code -- https://master.php.net/note/delete/88359/bad+code Del: spam -- https://master.php.net/note/delete/88359/spam Del: non-english -- https://master.php.net/note/delete/88359/non-english Del: in docs -- https://master.php.net/note/delete/88359/in+docs Del: other reasons-- https://master.php.net/note/delete/88359 Reject -- https://master.php.net/note/reject/88359 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#149578) next »