TheEddy Posted August 3, 2010 Share Posted August 3, 2010 <?php $pageTitle='Edit Profile'; require_once ("header.php"); ?> How can I pass a variable like that through header.php? I know it doesn't work the way I have it. Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted August 3, 2010 Share Posted August 3, 2010 <?php $pageTitle='Edit Profile'; require_once ("header.php"); ?> How can I pass a variable like that through header.php? I know it doesn't work the way I have it. What doesn't work? If you echo $pageTitle in header.php it will work, unless header.php has already been included/required. Quote Link to comment Share on other sites More sharing options...
TheEddy Posted August 3, 2010 Author Share Posted August 3, 2010 <?php $pageTitle='Edit Profile'; require_once ("header.php"); ?> How can I pass a variable like that through header.php? I know it doesn't work the way I have it. What doesn't work? If you echo $pageTitle in header.php it will work, unless header.php has already been included/required. I am an idiot, I see the problem now haha. I had: <title>$pageTitle</title> in header.php and it displayed $pageTitle as the title. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.