variables - PHP - Times Value by Percentage - VAT -
variables - PHP - Times Value by Percentage - VAT -
i have cost $special lets 10. want add together uk vat rate of 20% of value display vat inclusive price. have tried below.
$vatrate = 0.20; $endprice = ((int)$vatrate/100)*$special)+$special; echo $endprice; but seeing error., page blank means error of sort ?
try this..
you have created percent of vat 0.20 no need split 100 here again.
> $vatrate = 0.20; > $endprice = ($vatrate*$special)+$special; > echo $endprice; php variables
Comments
Post a Comment