Is there any way to round to a whole number when dividing?
An example would work best to explain so here it goes.
One bus can hold 50 people and you MUST fill 50 people to get a bus. If you have 149 people you get 1 bus and 49 people travel by van. Here's how the script would go:
<?
// Calculate the number of buses needed
$buses = $people / 50;
// Calculate the number of people taking vans
$people_in_vans = $people % 50;
// Display the results of the calculation
echo "There will be $buses buses with 50 people on each bus, and $people_in_vans people riding in vans.";
?>
Now if you fill in the form (not needed in this example, just trying to show something) 79 people are are going it would end up calculating 1.58 buses. How would I round to a whole number? Considering you can't have 2 buses in this example, the answer has to be 1 so you would round down to the nearest whole number if there is a decimal. Anyone know how to accomplish this?