You mean
if( $var == "duck" || $var == "goose" ..etc
A single equal sign is assignment, double is test for equality.
Check the string functions, you could try something like:
if ( strpos( "duckgoosehenchickenpeacock", $var ) != 0 ) {do something}
else {critter in $var not part of our set}
It all depends on what you want to do, and of course "duck ... cock" could
be a variable.
Have a look at switch case break as well.
Miles Thompson
At 03:04 PM 3/23/01 -0400, darion mapp wrote:
>try
>if($var = "duck" || $var = "goose"){}else{}
>
>now you should look into the switch-case function also
>--
>
>On Wed, 13 Dec 2000 00:19:08
> JCampbell wrote:
> >Thank you all for your help earlier!
> >
> >Now I need to know if it is possible to create a complex if statement?
> >
> >if ($variable=="duck") || ($variable=="goose"){ }else{ }
> >
> >Is how I thought it would work. I just need to know if there is an easy way
> >to do an OR in if statements IF variable equals duck or goose...
> >
> ><Jon>
> >===============================
> >And shepards we shall be
> >For thee, my lord, for thee
> >For thou hath descended forth from thy hands
> >That our feats may swiftly carry out thy command
> >We will flow a river forth unto thee
> >And teaming with souls shall it ever be...
> >===============================
> >http://jcampbell.blacklightning.net
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>Get 250 color business cards for FREE! at Lycos Mail
>http://mail.lycos.com/freemail/vistaprint_index.html
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]