I'm using the following function to affect the class of a row.
function selectClass(){
$result = sql_query("SELECT menuid,menuname,url,parent,menulabel FROM tblmenu WHERE parent = 0 AND module_id = '1' AND view= '1' ORDER BY menuname ASC");
$counter = 0;
while ($row = sql_fetch_array($result)){
$menulabel = $row['menulabel'];
$mod = '.$mod.';
if ($menulabel == "$mod"){
echo '<td width=" " valign="top" class="td_select">
<a id="a_root'.$counter.'" border="0" style="cursor:hand; text-align:top;">
<a class="td_root" onMouseover="this.style.color=\'black\'" onMouseout="this.style.color=\'white\'" onMouseout="this.style.color=\'white\'" href="'.$row[2].'">'.$row[1].'</a>
</td>';
}else{
echo '<td width=" " valign="top" class="root_td">
<a id="a_root'.$counter.'" border="0" style="cursor:hand; text-align:top; ">
<a class="td_root" onMouseover="this.style.color=\'black\'" onMouseout="this.style.color=\'white\'" onMouseout="this.style.color=\'white\'" href="'.$row[2].'">'.$row[1].'</a>
</td>';
}
}
return;
}
The idea is that the class of the row is changed if the name of the page (the mod) displayed is the same as the menulabel. Everything that echos out is the td_root class.
Any suggestions?