squid
Account Closed
- Impact
- 19
Hi,
I have a function that echo's the navigation for a website, it runs perfectly, BUT, it breaks out of the layout. If i do;
It "Breaks" out of the div and puts itself above everything else.
The function is;
Why does it break out of the Div?
So if i have;
When i view the page in my browser, the following happens;
I have a function that echo's the navigation for a website, it runs perfectly, BUT, it breaks out of the layout. If i do;
PHP:
<div id="something"><?php eNavigation(); ?></div>
It "Breaks" out of the div and puts itself above everything else.
The function is;
PHP:
function eNavigation(){
$domain = $_SERVER['HTTP_HOST'];
$NAVresult = mysql_query("SELECT site FROM pages WHERE site='$domain' ORDER BY id ASC");
while ($NAVrow = mysql_fetch_assoc($NAVresult)) {
if ($NAVrow['title'] == 'Home') {
continue;
}
echo "<li><a href=\"";
echo stripslashes($NAVrow['title']);
echo "\">";
echo stripslashes($NAVrow['title']);
echo "</a></li>";
}
}
Why does it break out of the Div?
So if i have;
PHP:
<html>
<head>
<title>hi</title>
</head>
<body>
<div id="something"><?php eNavigation(); ?></div>
</body>
</html>
When i view the page in my browser, the following happens;
PHP:
<NAVIGATION STUFF HERE>
<html>
<head>
<title>hi</title>
</head>
<body>
<div id="something"></div>
</body>
</html>





