Ok. Wll show you with an example:
if (($site_style!=="10") && ($site_style!=="9") && ($site_style!=="8"))
{ }
elseif ($site_style=="10") {
}
Should simply be
if($site_style != ('10' or '9' or '8')) {}
Bla bla bla
Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Maxim Maletsky (PHPBeginner.com)
[mailto:[EMAIL PROTECTED]]
Sent: gioved� 4 ottobre 2001 7.56
To: 'Jason Dulberg'; 'Rasmus Lerdorf'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's
Jason, are not a dope
As mentioned to you by Rasmus:
just move those !== off the script replacing them with !=
That is what causes your error.
Maxim Maletsky
www.PHPBeginner.com
-----Original Message-----
From: Jason Dulberg [mailto:[EMAIL PROTECTED]]
Sent: gioved� 4 ottobre 2001 7.43
To: Rasmus Lerdorf
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php in css not working with IF's
Thanks for sticking with me here and for your examples!!
So basically, I need to use AND instead of OR.
if (($site_style!=="10") && ($site_style!=="9") && ($site_style!=="8"))
{ }
elseif ($site_style=="10") {
}
hrm... it didn't work.
Sorry for being such a dope about this.... :(
Jason
> Ok, you are clearly not following along here... ;)
>
> You have (let $site_style = A for brevity):
>
> if( A!=10 OR A!=9 OR A!=8 )
>
> When A=10 this becomes:
>
> if( 10!=10 OR 10!=9 OR 10!=8 )
> false true true
>
> if( false OR true OR true ) is the same as if (true)
>
> Seriously, try drawing the Venn diagram for your expression.
>
> Or try substituting common english.
>
> if Jason is not 21 or Jason is not 20 or Jason is no 19 let him into
> the cool club.
>
> Say Jason is 21, is he allowed in? Sure he is, because one of the
> conditions for getting into the cool club is that Jason is not 20. It
> doesn't matter that one of the other conditions says to not let Jason
> in. If the people writing the rules wanted to force all the conditions
> to apply they would have written:
>
> if Jason is not 21 AND Jason is not 20 AND Jason is not 19, let him
> into the cool club.
>
> -Rasmus
>
>
--
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]
--
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]