Log in

View Full Version : echo outputs in body but not inside head title



ggalan
04-04-2010, 03:28 PM
im following the tutorial from
http://www.dynamicdrive.com/forums/showthread.php?t=28260

however "echo $title;" seems to output inside the <body> but not inside <head>

can anyone lend a hand please
thank you

ggalan
04-04-2010, 03:49 PM
solved:
i placed "<?php generateMenu(); ?>" before <html> tag so that the function would instantiate

ggalan
04-04-2010, 04:16 PM
this seems to work, but now the output from the template looks like this

<div id="mainNav"><ul><li><a class="buttons" href="?p=blue">Blue Page text</a></li><li><a class="buttons" href="?p=red">Red Page text</a></li><li><a class="buttons" href="?p=green" class="selected" >Green Page texter</a></li></ul></div><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link type="text/css" rel="stylesheet" href="css/style.css">
<title>My PHP Template - Green Page texter</title>
</head>

<body>
<div style="width:800px; height:600px; background-color:#00fc24"></div>
</body>
</html>
is there a way to get that div inside the body??