function get_random_color(){ for ($i = 0; $i<6; $i++) { $c .= dechex(rand(0,15)); } return "#$c";}
<table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr> <td class="header2">New Members</td> </tr> <tr> <td class="content2"><?php $tur1 = 'SELECT username, userid FROM dd_users WHERE userid!="1" ORDER BY userid DESC LIMIT 0,6'; $resultt = mysql_query($tur1); if (!$resultt) { echo 'Cannot connect to the databese'; } else { $tur = sqlcache('newmembers', $cachelife, $tur1); foreach($tur as $r){ echo ' <span style="color:'.get_random_color().'">'.$r['username'].'</span><br />'; }}?> </td> </tr> </table>