RE: [PHP] php in css not working with IF's
| From: | Jason Dulberg | Date: | Thu, 04 Oct 2001 06:34:04 +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-69898@lists.php.net to get a copy of this message | ||
Should I stick with
if (($site_style!="10") && ($site_style!="9") &&
($site_style!="8"))
or
if($site_style != ('10' or '9' or '8'))
So here's what I've gathered from the various messages and my current
methods:
- index.php selects $site_style from the db
- header.php is included by index.php (header.php has the css src for
styles.php in it)
- styles.php has the IF's
- I need to put <link rel="stylesheet"
src="styles.php?site_style=xx&BROWSER_PLATFORM=xyz"> to pass the variables
from the script to the css file
(if possible, I need to get around this as headers are being included with
the css src already in them)
- do not need to use require() in styles.php
Thanks to everyone for all the suggestions!! :)
Jason
> -----Original Message-----
> From: Rasmus Lerdorf [mailto:rasmus@php.net]
> Sent: October 4, 2001 2:09 AM
> To: Maxim Maletsky (PHPBeginner.com)
> Cc: 'Jason Dulberg'; php-general@lists.php.net
> Subject: RE: [PHP] php in css not working with IF's
>
>
> > 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')) {}
>
> Stop confusing the lad. That obviously won't work.
>
> -Rasmus
>
>