Change colour of table td based on value
I have this code in my table calling in a number
<tr> <td>Total: <?php echo $total_credit;?></td> </tr>
I would like to change the background colour or the text colour depending on whether this value is equal to or higher than 2, is there an easy way I could do this with an If statement?
Thanks for any help in advance!