Page 1 of 1

echo a string in a master page failing

Posted: Sun Jan 16, 2011 4:03 pm
by parri2bd
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');
?>

Re: echo a string in a master page failing

Posted: Sun Jan 16, 2011 4:06 pm
by parri2bd
don't worry about the answer it is my dumb fault. href instead of src. :oops: