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? Link to comment https://forums.phpfreaks.com/topic/179614-solved-changing-color-for-echo-value/ 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. Link to comment https://forums.phpfreaks.com/topic/179614-solved-changing-color-for-echo-value/#findComment-947711 Share on other sites More sharing options...
Leveecius Posted October 30, 2009 Author Share Posted October 30, 2009 Thanks! That worked! Link to comment https://forums.phpfreaks.com/topic/179614-solved-changing-color-for-echo-value/#findComment-947716 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.