Re: Having problems with an IF statement, just doesn't make sense
| From: | Chris Hayes | Date: | Sun, 06 Jul 2003 21:30:21 +0000 |
| Subject: | Re: Having problems with an IF statement, just doesn't make sense | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-154149@lists.php.net to get a copy of this message | ||
At 19:18 7-7-2003, you wrote:
I am using the following if statement ... if (isset($theme)) { print("Current theme is $theme"); require "content/header_$theme.php"; } else { print("$theme"); require "content/header.php"; } now one would think that if it didn't return true that the else statement wouldn't print anything for $theme ... but it does. Also if I use !isset it returns true with a null value for $theme ... This doesn't make sense to me ... maybee I am doing something wrong, if I am someone please correct me heh. If i use this bit of code it acts as you and I expect.So there may be something in the previous code that is acting up here. Do you see any value in $theme when you do echo "[$theme]"; ? Spaces should show up this way. Are you working for a CMS? If so, which one? (i ask because i know the nukes family uses $theme)