Hi,
The following piece of code is creating a list box of dates. The field u.fittest contains a color (eg. #CC0000) and I want the font color of each entry in the list to be that of the value in u.fittest. Can someone help me with this?
Thanks in advance for any help.
[code] <?
$sql=“SELECT DISTINCT w.date, u.fittest from #__jform_workout w,#__jform_userworkout u where w.userid=u.id and u.user=”.$_POST[‘user’]." order by w.date “;
$database->setQuery($sql);
$objW=$database->loadObjectList();
if($objW)
{
foreach($objW as $obj)
{
if($_POST[‘date’]==$obj->date)
echo (”".date(‘d-M-Y’,strtotime($obj->date))." “);
else
echo (”".date(‘d-M-Y’,strtotime($obj->date))." ");
}
}
?>[/code]