Reply to Re: [PHP] if question

Your name:

Reply:


Posted by Andy Pieters on 04/06/05 11:55

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/
--

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация