I want to add 30.4 percent of $drivervalue
to $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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With