RE: [PHP] php in css not working with IF's

From: Date: Thu, 04 Oct 2001 15:22:34 +0000
Subject: RE: [PHP] php in css not working with IF's
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69944@lists.php.net to get a copy of this message
$site_style ranges from 1 - 11 $site_style 1 - 7,11 use the same css style. $site_style 8,9 use the same css $site_stylye 10 uses different css from them all. Thanks for your time. Jason > -----Original Message----- > From: David Robley [mailto:huntsman@www.nisu.flinders.edu.au] > Sent: October 4, 2001 2:48 AM > To: Jason Dulberg; Rasmus Lerdorf > Cc: php-general@phpbeginner.com; php-general@lists.php.net > Subject: Re: [PHP] php in css not working with IF's > > > On Thu, 4 Oct 2001 16:04, Jason Dulberg wrote: > > Should I stick with > > > > if (($site_style!="10") && ($site_style!="9") && > > ($site_style!="8")) > > > > or > > > > if($site_style != ('10' or '9' or '8')) > > As has been pointed out, that latter won't work. What is the range of > possible values for $site_style? If it is 10 or less, then you could > simply rephrase the test to > > if($site_style < 8) > > or alternatively, if the range is 0 to more than 10 > > if( $site_style < 8 || $site_style > 10 ) > > > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > "Ici nous voyons le tour Eiffel!" Tom parried. >

« previous php.general (#69944) next »