help with if statement

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jasondavis
Forum Commoner
Posts: 60
Joined: Sat Feb 04, 2006 5:35 pm

help with if statement

Post by jasondavis »

My code now

Code: Select all

$line = $time.'||<a href="http://mycrib.net/?pageid=mycrib.member.profile&ID='.$id.'" title="View my MyCrib Profile" target="_blank">'.$name.'</a>||'.$text;
I would like to make this an if statement like if $name = jasondavis
then
$line = $time.'||<a href="http://mycrib.net/?pageid=mycrib.member ... e&ID='.$id.'" title="View my MyCrib Profile" target="_blank">'.$name.'</a>||'.$text;

else

$line = something else

please help
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Code: Select all

if($name == "jasondavis")
{
    $line = $time.'||<a href="http://mycrib.net/?pageid=mycrib.member.profile&ID='.$id.'" title="View my MyCrib Profile" target="_blank">'.$name.'</a>||'.$text;
}
else
{
    $line = "something else";
}
Post Reply