Re: Having problems with an IF statement, just doesn't make sense

From: Date: Mon, 07 Jul 2003 10:12:32 +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-154164@lists.php.net to get a copy of this message
> if (isset($theme)) { > print("Current theme is $theme"); > require "content/header_$theme.php"; if you try to send headers in "header_$theme.php", this wont work, because you can't send headers after you've printed or echoed something. try this: if (isset($theme)) { require "content/header_$theme.php"; print("Current theme is $theme"); } else { require "content/header.php"; print("$theme"); } mfg. harry wiens

« previous php.general (#154164) next »