Thread: class colour
View Single Post
  #1  
Old 14th April 2012, 14:46
HUnter83 HUnter83 is offline
Senior Member
 
Join Date: Aug 2010
United Kingdom
Posts: 46
Default class colour
I know i could do this and it colors it

Code:
case UC_ADMINISTRATOR: return "<font color=red>Administrator</font>";
but i have made a function like this

Code:
 function get_user_class_color($class)
{
  switch ($class)
  {
    case UC_USER: return "#000000";

    case UC_POWER_USER: return "#00FF00";

    case UC_VIP: return "#8E35EF";

    case UC_UPLOADER:  return "#FF00FF";

    case UC_MODERATOR: return "#0000FF";

    case UC_ADMINISTRATOR: return "#FF0000";

    case UC_SYSOP: return "#008000";
  }
  return "";
}
but when i code it like this

get_user_class_color($CURUSER["class"]) ." )" .

i get the class name and color code like this (administrator#FF0000)

any ideas ?
Reply With Quote