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.
$qty_p = $_POST['qty']; //get number from input field $price_db = $row['price']; //get number from database
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.
$total = $price_db * $qty_db;
i think the problem is that $price_db is a string. and than its being convert to int and not double.
i tried this but didnt worked:
$price_db = $row['price']; $price_db = (float)$price_db;