echo a string in a master page failing
Posted: Sun Jan 16, 2011 4:03 pm
I have the below html and php in my master (shortened for brevity). I cannot insert the style sheet information from the index.php into the final rendering. It shows up in the source of the webpage from the browser, but it does not apply the styles to the webpage. Any help?
master.php
<html>
<head>
<?
if (isset($page_head_extra)) {
echo $page_head_extra;
} else {
echo "";
}
?>
</head>
<body>
</body>
</html>
index.php
<?
$page_head_extra = "<link type='text/css' rel='stylesheet' src='css/index-content.css' />";
$page_content = 'index-content.php';
include('master.php');
?>
master.php
<html>
<head>
<?
if (isset($page_head_extra)) {
echo $page_head_extra;
} else {
echo "";
}
?>
</head>
<body>
</body>
</html>
index.php
<?
$page_head_extra = "<link type='text/css' rel='stylesheet' src='css/index-content.css' />";
$page_content = 'index-content.php';
include('master.php');
?>