Below is the code I am using within a while loop to display a number within a table row and it's amount divided by 200 right next to it ('amount').
It works ok in that it takes off the decimals and divides by 200 but I was wondering how do I round it down?
For example If I have 850 it will echo '4', however if the amount is over 900 it will echo '5'. I gather that if it is over the halfway mark of 200 it will round up, but how can I round down everything that is below 200?
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo '<tr>';
echo '<td align="left"><strong>' . $row['name'] . '</strong></td> ';
echo '<td align="left">' . $row['amount'] . '</td>';
echo '<td align="center"><strong><font color="#be0f34">';
echo number_format("{$row['amount']}"/200,0);
echo '</font></strong></td>';
echo '<td align="center">' . $row['date'] . '</td>
</tr>
';
}
Cheers