I'm trying to add a mark up percentage to the $cents per Mile, for some reason it ignores it. How can I create a var that I can enter a whole number for percentage and have it add it to the cost?
<?php
$PriceofgallonGas = 2.59 ;
$precent = 50 ;
?>
<?php
function installVanFuel() {
global $PriceofgallonGas,$precent;
$TankMiles = 254;
$SizeofTankinGallons = 31;
$mpg = $TankMiles / $SizeofTankinGallons;
$markup = (1 + $percent/100);
$centsPerMile = $PriceofgallonGas/$mpg;
echo round($centsPerMile*$markup, 2);
}
?>