First things first, I question if (loggedin()) { portion of the script and I took the following liberties in guessing what you’re trying to accomplish:
[php]<?php
/* Get Rid of Comments to see what navigation /
/ looks like when logged-in. */
//$user = “John Wayne”
?>
Understanding PHP 101
body { font-size: 100%; }
.nav { display: block; width: 600px; height: 40px; background-color: orange;}
.nav ul { list-style: none;}
.nav ul li a { display: block; float: left; width: 140px; height: auto; border-right: 2px solid #fff; line-height: 40px; color: #fff; font-size: 1.2rem; text-decoration: none; text-align: center; }
.nav ul li a:hover { color: #2e2e2e; }
- Home
<?php
//if(loggedin()){ // You might be using a framework,
// but I don't know for I don't do frameworks
if (isset($user)) { // So I did a little guessing on my part:
echo '- Messages
';
echo '- Log Out
';
}else{
echo '- Login
';
echo '- Register
';
}
?>
[/php]
Anytime you have html in php you have to echo it out — OR— keep closing the php code off with <?php ?> (Which I personally find messy). Anyways like I said I guessing what you want. One last suggestion, I would get the HTML/CSS done a little more pat (learn it better is what I mean), it will help you in the long run.
I hope this helps out a little bit? :-\ ;D
and to let you see that I practice in what I preach. 
[php] ≡
- Home
- About
- Forums
- Tutorial
- Contact
- Gallery
- The List
- Trivia
<?php
if ($pageTitle == “About | John R. Pepp” || $pageTitle == “HTML5, CSS3, jQuery and PHP Forums” || preg_match("/ Forum/i", $pageTitle)) {
if ($user) {
echo ‘- Logout
’;
} else {
echo ‘- Login
’;
}
}
?>
<?php echo (!($user) && ($pageTitle == "HTML5, CSS3, jQuery and PHP Forums" || preg_match("/ Forum/i", $pageTitle))) ? '- Register
' : NULL; ?>
-
[/php]