I populate a list of dates from a MySQL
database like this:
<?php
while ($row = mysql_fetch_array($list_customers)) {
echo "<tr>
";
echo "<td>".$row['customer_date']."</td>
";
echo "</tr>
";
}
?>
Now I would like to add the result inside a <span>
that changes class=''
based on some criteria:
- If date result is within a 30 days reach from todays date, add
class='yellow'
- If date result is over 30 days from today, add
class='green'
- If date result has passed, based on todays date, add
class='red'
Would this be possible? Thanks in advance.