note 102246 rejected from control-structures.switch by danbrown

From: Date: Thu, 03 Feb 2011 18:10:37 +0000
Subject: note 102246 rejected from control-structures.switch by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-176658@lists.php.net to get a copy of this message
Note Submitter: ashok at pushlife dot com ---- NEED HELP! So I'm using the switch statement like this: switch($state) { case ($state === 204): if ($state == 0) { $transactions['Success'] += $cnt; echo "THIS GETS PRINTED!"; break; } $transactions['Fail'] += $cnt; $transactions['SOAP Error (204)'] += $cnt; break; } The echo actually gets printed! How is this possible? I did the strict and the loose compare and both give the same results! This is making me go crazy! Please help!

« previous php.notes (#176658) next »