Ragazzi uso queste due funzioni per gestire il prezzo:
$prezzo = $row_schede['prezzo'];
$totale = $prezzo * $quantita;
$tot_imponibile = $tot_imponibile + $totale;
$prezzo = str_replace(".",",",$prezzo);
$prezzo = number_format($prezzo, 2, ',', ',');
$totale = str_replace(".",",",$totale);
$totale = number_format($totale, 2, ',', ',');
$totale_ivato = $totale_ivato + $tot_imponibile;
$to_ivato = $totale_ivato;
$totale_ivato = str_replace(".",",",$totale_ivato);
$totale_ivato = number_format($totale_ivato, 2, ',', ',');
$tot_imponibile = str_replace(".",",",$tot_imponibile);
$tot_imponibile = number_format($tot_imponibile, 2, ',', ',');
Quando stampo il totale_ivato, mi fa l'arrotondamento per eccesso o per difetto che non deve fare.
Come risolvo?