Posted by J.O. Aho on 01/02/06 18:49
Curtis wrote:
> <?php
> global $user;
> if ($user->uid) {?> <li><a href="logout" title="">Log
> Out</a></li>
> <?php } else {?> <li><a href="user/login" title="">Log
> In</a></li>
> <?php }?>
>
> Ten characters in order to type that closing brace? Wow.
This generates less work for PHP than what
<?PHP
if ($user->uid) {
echo "<li><a href=\"logout\" title=\"\">Log Out</a></li>";
} else {
echo "<li><a href=\"login\" title=\"\">Log In</a></li>";
}
?>
//Aho
Navigation:
[Reply to this message]
|