I'm trying to change the background color of cells whose values are the same as the day the user visits the site.
The variable $dataa
saves the dates of each name ...
Formatting table (is within a php loop):
echo "
<tr>
<td id=\"linha".$l."\">".$nomes[$l]."</td>
<td class=\"dataa\">".$dataa[$l]."</td>
</tr>
";
Attempt to color:
<SCRIPT>
<?php
echo "var obj = new Array();";
for ($k=0; $k<16; $k++){
if ( $data_pro_php[$k] == '23' ) {
echo "
obj[$k] = getElementById(\"linha$k\");
obj[$k].style.backgroundColor='#FF0000';
";
}
}
?>
</SCRIPT>