I am having problems with a variable which reads 17,50 for calculation. The variable is part of an array and i am just getting the value 17.00
$product_price_tmp = intval(str_replace(",",".",$custom_values['product_price'][0]));
and i tried the following
$product_sub_total = sprintf("%.2f",$product_price_tmp);//reads 17.00
$product_sub_total = $product_price_tmp;//reads 17
I didn't notice the problem as all my test price values were rounded numbers.
Any tips?
intval()?floatval()instead ofintval()