Re: if question

From: Date: Wed, 06 Apr 2005 08:55:06 +0000
Subject: Re: if question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-212376@lists.php.net to get a copy of this message
On Wednesday 06 April 2005 10:47, William Stokes wrote: > Hello, > > I need to test if a variable value is 3 or 6 or 9 or 12 or 15 or 18 ... > goes on like this. > > How this can be done? > > Thanks > -Will switch($yourvar) {case 3: somestuff; break; case 6: somestuff; break; etc default: somestuff; break; } You can find answers to these and many other questions on www.php.net Look at the documentation section Andy -- Registered Linux User Number 379093 -- Feel free to check out these few php utilities that I released under the GPL2 and that are meant for use with a php cli binary: http://www.vlaamse-kern.com/sas/ --

« previous php.general (#212376) next »