RE: [PHP] switch statemnts.

From: Date: Fri, 14 Jul 2000 13:39:59 +0000
Subject: RE: [PHP] switch statemnts.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6632@lists.php.net to get a copy of this message
Nice one, thank-you very much for the info. Sorry I have only just got back to U. Greg :-) -----Original Message----- From: Phil Driscoll [mailto:phil@dialsolutions.co.uk] Sent: 12 July 2000 18:26 To: php-general@lists.php.net Subject: Re: [PHP] switch statemnts. This doesn't help with your query, but out of interest, in BBC BASIC on Acorn Risc OS machines there is a nice trick which can be done with the switch statement because of the way it is implemented. The PHP equivalent is: switch(TRUE) { case($v<=0):stuff; case($v==0):stuff; default:stuff; } It makes for much neater looking code than a load of elsifs. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#6632) next »