Hi!
This is the situation: I have a list of items, and one of LI is:
echo '<li><a href= "index.php" title="">Link</a></li>';
Now, I want to make an if statement here - if user is logged in, give home.php, else give index.php - but I'm kinda lost in all those "s and 's and .s so I'm asking for your help
This code won't do :/
echo '<li><a href= "' . if($logged == 0) echo "index.php" else "home.php" . '" title="">Link</a></li>';
Also, I know I could do it with this code, but I want to finally get those dots and stuff
if ($logged == 0)
{
echo '<li><a href= "index.php" title="">Link</a></li>';
}
else
{
echo '<li><a href= "home.php" title="">Link</a></li>';
}