echo a string in a master page failing

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
parri2bd
Forum Newbie
Posts: 2
Joined: Sun Jan 16, 2011 3:53 pm

echo a string in a master page failing

Post 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');
?>
parri2bd
Forum Newbie
Posts: 2
Joined: Sun Jan 16, 2011 3:53 pm

Re: echo a string in a master page failing

Post by parri2bd »

don't worry about the answer it is my dumb fault. href instead of src. :oops:
Post Reply