Leveecius Posted October 30, 2009 Share Posted October 30, 2009 Ok guys, I'm trying to figure out if there is a way to change the color of a echo value. Here is what I thought it would be for example: if ($mylevel ==2){ echo <font color="orange">"Entertainer"</font>;} if ($mylevel ==5){ echo <font color="lime">"Help Desk Operator"</font>;} if ($mylevel ==10){ echo <font color="blue">"Moderator"</font>;} if ($mylevel ==15){ echo <font color="red">"Administrator"</font>; Is that right or what am I doing wrong? Quote Link to comment Share on other sites More sharing options...
Bricktop Posted October 30, 2009 Share Posted October 30, 2009 Hi Leveecius, It's just about right, you have your speechmarks in the wrong place though. CHange your code to read: if ($mylevel ==2){ echo '<font color="orange">Entertainer</font>';} if ($mylevel ==5){ echo '<font color="lime">Help Desk Operator</font>';} if ($mylevel ==10){ echo '<font color="blue">Moderator</font>';} if ($mylevel ==15){ echo '<font color="red">Administrator</font>'; Hope this helps. Quote Link to comment Share on other sites More sharing options...
Leveecius Posted October 30, 2009 Author Share Posted October 30, 2009 Thanks! That worked! Quote Link to comment 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.