RE: [PHP] switch statemnts.

From: Date: Fri, 14 Jul 2000 13:40:30 +0000
Subject: RE: [PHP] switch statemnts.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6633@lists.php.net to get a copy of this message
Nice thanks 4 this, sorry I haven't been back but busy. Greg :-) -----Original Message----- From: Boget, Chris [mailto:Chris.Boget@wild.net] Sent: 12 July 2000 18:08 To: 'greg@william-russell.co.uk'; php-general@lists.php.net Subject: RE: [PHP] switch statemnts. > Can I do someting like this? > switch($v){ > case <=0: > stuff; > case 0: > stuff; > case >=0: > stuff > default; > } I don't think you can do the above, but I'm sure if it is possible, someone will come after me and say how. > and this > switch($v){ > case 1 or 2 or 3 or 4: > stuff; > case 5,6,7,8: > stuff; > default; > } switch( $v ) { case 1: case 2: case 3: case 4: stuff break(); case 5: case 6: case 7: case 8: other stuff break(); default: that stuff break(); } Chris

« previous php.general (#6633) next »