seany123 Posted April 10, 2009 Share Posted April 10, 2009 to be honest i should really know how to do this but nevermind.. all i want to do is add a url to all these echo's... <?php if ($player->ncolor == 1) { echo "<font color=\"blue\">".$player->username."</font>"; } else if($player->ncolor == 2) { echo "<font color=\"green\">".$player->username."</font>"; } else if($player->ncolor == 3) { echo "<font color=\"yellow\">".$player->username."</font>"; } else if($player->ncolor == 4) { echo "<font color=\"pink\">".$player->username."</font>"; } else if($player->ncolor == 5) { echo "<font color=\"silver\">".$player->username."</font>"; } else if($player->staff >= 1) { echo "<font color=\"gold\">".$player->username."</font>"; } else if($player->rm >= 1) { echo "<font color=\"red\">".$player->username."</font>"; } else { echo "<font color=\"\">".$player->username."</font>"; } ?> this is the url i wanted added. <a href=\"profile.php?id=" . $member['username'] . "\">" Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/ Share on other sites More sharing options...
revraz Posted April 10, 2009 Share Posted April 10, 2009 Add it just like you posted it then. Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806794 Share on other sites More sharing options...
seany123 Posted April 10, 2009 Author Share Posted April 10, 2009 how do i combine echo "<font color=\"pink\">".$player->username."</font>"; and <a href=\"profile.php?id=" . $member['username'] . "\">" Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806832 Share on other sites More sharing options...
jackpf Posted April 10, 2009 Share Posted April 10, 2009 Have a guess. Go on; go crazy. Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806839 Share on other sites More sharing options...
Maq Posted April 10, 2009 Share Posted April 10, 2009 Ermmmmm, something like? echo "" . $player->username . ""; Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806870 Share on other sites More sharing options...
seany123 Posted April 10, 2009 Author Share Posted April 10, 2009 working.. thanks Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806895 Share on other sites More sharing options...
revraz Posted April 10, 2009 Share Posted April 10, 2009 You really should just try stuff like this to see if it works. How else you going to learn? Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806930 Share on other sites More sharing options...
jackpf Posted April 11, 2009 Share Posted April 11, 2009 Seconded. I don't intend to be rude; but did you attempt this at all before posting it? I mean...it is pretty obvious. Could you not have learnt this yourself in about 30 seconds with the help of google? Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-806943 Share on other sites More sharing options...
seany123 Posted April 11, 2009 Author Share Posted April 11, 2009 why are you still posting on a resolved post... in answer to your question. i did google it but i didnt know wxactly what to search. i didnt know how to do it, so i looked for help.... thats what this forum is for and it worked brilliantly. when seeking help.. a good reply isnt "have a guess, go crazy" how is that helping anything? i did try to do it myself and failed... which is why i posted here. finally, i dont mean to be rude either... because i respect everyone who spends their time trying to help others.. but you have now made two posts on here... and neither was educational nor on subject. Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-807235 Share on other sites More sharing options...
jackpf Posted April 11, 2009 Share Posted April 11, 2009 Ok, well the purpose of my first post was an attempt to invoke some effort on your part. If you honestly googled it, you would have found many articles and tutorials about how to do this, such as this amongst others. Even if you couldn't find anything on google, guessing would have sufficed. I mean...is it not obvious how to echo a hyperlink? You've succeeded in echoing font colors...that's basically the same thing. Forgive me if I am incorrect, but I don't believe that you attempted this at all before posting here. And you have my sincere apologies; I didn't know that it is forbidden to post in solved topics. Quote Link to comment https://forums.phpfreaks.com/topic/153540-solved-very-simple/#findComment-807266 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.