Hello, Im updating a post var using sprintf to add 2.00 to it. However it will knock off the value after the decimal and replace it with .00
for instance
// $_POST['amount'] = 100.22
$_POST['amount'] = sprintf('%.2f', (int) $_POST['amount']+2);
echo $_POST['amount'];
// returns 102.00
I would like it to output "102.22"
Am i not using the proper syntax?
Any help is much appreciated.