I have a form, when a user fills in the total number of bottles they have, it inserts into a database and then should sum up how many cases there are.
For example in wine - there are 12 bottle cases, if a user puts in 100 bottles, it should divide this by 12 and give the sum of 8.33333333.
$bottles = "100";
What is the best way to round this down to just the number 8 and then work out how many bottles are left that never made it into a full case?
Hope this makes sense.