note 54251 added to control-structures.switch

From: Date: Tue, 28 Jun 2005 12:25:14 +0000
Subject: note 54251 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-91088@lists.php.net to get a copy of this message
/* Have one value need to deal with currency - follow as example */ while ($row = mysql_fetch_array($v_Result,MYSQL_NUM)) { $v_BAL = $row[1]/10000; switch (TRUE){ case ($v_BAL <= 0): //less then 0 , -0 echo $v_BAL; break; case ($v_BAL <= 10 AND $v_BAL >= 1): //less then 10 and greater then 1 echo $v_BAL; break; default: //default echo $v_BAL; break; } } ---- Manual Page -- http://www.php.net/manual/en/control-structures.switch.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+54251 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+54251&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+54251&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+54251&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+54251&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+54251&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+54251&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+54251&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#91088) next »