i have two number qty_p and price_db. qty_p will be always int. and price_db can be int or double with 2 decimal place.
on top iam get the value and so far its fine.
but below the php is round the number up and losing the 2 decimals. can any one explain to me why its doing that. is there a function that can i use?
$qty_p = $_POST['qty']; $price_db = $row['price'];
on top iam get the value and so far its fine.
but below the php is round the number up and losing the 2 decimals. can any one explain to me why its doing that. is there a function that can i use?
$total = $price_db * $qty_db;