I want to add 30.4 percent of
$drivervalue, is it possible to do that as below? I know if I knew what the actual number was going to be I could just put the 30.4 after the 1., but as I wont know what it will be, I am using the variable instead is this a valid syntax?
//example $drivervalue = 16000000; $percentdiff = 30.4; $drivvalue *= 1. $percentdiff;
$drivervalue *= (1 + $percentdiff / 100);
$num = 100; $percentage = 30.4; $num += $num*($percentage/100); // results in 130.4
$drivervalue = $drivervalue * (1 + ($percentdiff / 100));