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

2001-10-05 Thread Jon Farmer
Budweiser if ( A != 10 or A != 9 ) -- Jon Farmer Systems Programmer, Entanet www.enta.net Tel 01952 428969 Mob 07763 620378 PGP Key available, send blank email to [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

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

2001-10-04 Thread Jason Dulberg
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

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

2001-10-04 Thread David Robley
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

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

2001-10-04 Thread Jason Dulberg
$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:[EMAIL PROTECTED]] Sent: October 4, 2001 2:48 AM

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

2001-10-04 Thread Jason Dulberg
I just want to thank everyone who helped me get the css stuff to work. All of the IF statements are now working properly --- I've certainly learned a lot from all the messages. thanks again... Maxim Maletsky Rasmus Lerdorf and all others who responded to my message! __ Jason

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

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 13:49, Jason Dulberg wrote: I have a common css file that is being used across several virtual hosts. Basically, what I am trying to do is use the same css file even though several text colors/sizes need to be changed depending on what site/platform its being used on. I

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

2001-10-03 Thread Rasmus Lerdorf
if (($BROWSER_PLATFORM == Win) (($site_style!==10) || ($site_style!==9))) { Common logic mistake. if ( A != 10 or A != 9 ) Which value of A would make that logic false? -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

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

2001-10-03 Thread Jason Dulberg
Thank you for your response. I changed my the code to the method that you suggested. Unfortunately, it still doesn't use the IF's properly. For instance, if I open a $site_style 10, the IF statement for that is the following: elseif (($BROWSER_PLATFORM == Win) ($site_style==10)) {

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

2001-10-03 Thread Rasmus Lerdorf
Any other problems aside, this is not how you do 'Not Equal'. $site_style!=10 is correct syntax. No, !== is quite valid. It is the non-equality version of === See http://www.php.net/manual/en/language.operators.comparison.php -Rasmus -- PHP General Mailing List (http://www.php.net/)

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

2001-10-03 Thread Jason Dulberg
Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9... So I'm assumuming that my IF's are way off base? This is definitely something that'll be helpful for my other work as well. Thanks __ Jason Dulberg Extreme MTB http://extreme.nas.net -Original

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

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Without following your logic I can give an example of how style sheets on PHPBeginner.com work: In the page we have link rel=stylesheet href=/styles.php And in the styles.php we have all the possible DB connections, browser checks by (PHP SNIFF) and so and so on. You cold even try to call

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

2001-10-03 Thread Rasmus Lerdorf
Theoretically, either/or I'm assuming. If A isn't 10 or A isn't 9... But since A cannot be both 9 and 10 at the same time, A will *always* not be one of them. It's exactly the same as saying: if (!(A==9 AND A==10)) Obviously A cannot be both 9 and 10 at the same time so the above will be:

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

2001-10-03 Thread Jack Dempsey
nice to know demorgan's laws actually show up every now and then ;-) -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 12:58 AM To: Jason Dulberg Cc: [EMAIL PROTECTED] Subject: RE: [PHP] php in css not working with IF's Theoretically,

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

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Thanks Rasmus. The link you provided will become a great resource for PHPBeginner.com Cheers! Maxim Maletsky www.PHPBeginner.com -Original Message- From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] Sent: giovedi 4 ottobre 2001 6.58 To: Jason Dulberg Cc: [EMAIL PROTECTED] Subject: RE:

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

2001-10-03 Thread Rasmus Lerdorf
Would make a nice little PHP-GD exercise for someone to build a PHP app that took a boolean logical expression and produced a Venn diagram. Maybe limit it to 3 or less terms to not make your brain explode. -Rasmus On Thu, 4 Oct 2001, Maxim Maletsky (PHPBeginner.com) wrote: Thanks Rasmus.

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

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Do you want to do it? PHPBeginner.com and many other PHP sites would greatly appreciate it, Rasmus. Though, NOT and XOR are often unknown to beginners, I noticed it in their codes. Anyway, it is a great idea, I think. I see so many neo programmers confusing with it. Lots of PHP developers are

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

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
Wonderful! Update as all on your start so we can contribute! P.S: and happy birthday! Real-life story: my ex manager asked me once: Dude, I heard you're leaving office at 2am, are you also coding on your birthdays and Christmas? Maxim Maletsky www.PHPBeginner.com -Original Message-

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

2001-10-03 Thread Jason Dulberg
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

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

2001-10-03 Thread Jack Dempsey
have you thought about a switch statement? haven't looked at your code, but that would allow you a default, and then a bunch of cases, etc... jack -Original Message- From: Jason Dulberg [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 04, 2001 1:43 AM To: Rasmus Lerdorf Cc: [EMAIL

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

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)
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

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

2001-10-03 Thread David Robley
On Thu, 4 Oct 2001 15:25, Maxim Maletsky \(PHPBeginner.com\) wrote: 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 No, that was Rasmus telling _me_ that

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

2001-10-03 Thread Rasmus Lerdorf
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 -- PHP General Mailing List

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

2001-10-03 Thread Naintara Jain
Maybe you can try simplifying your logic. Why don't you avoid nested IFs till later, and keep to simple IFs. If you want to check for $site_style not equal to 10 and also not equal to 9 then you can say ($site_style != 10 $site_style != 9) or even !($site_style == 10 || $site_style == 9)