I don't understand the result ?! 29.85-3.5527136788005E-15 PHP bug ? Same result with floatval or cast can you help me ? The simple example code here :
<?php
$new = array('29.85');
$two = array('6.95','9.95','12.95');
$montantTotal = 0 ;
foreach ($two as $lignes) {
$montantTotal += floatval($lignes);
}
echo $montantTotal ;
$result = $montantTotal - floatval($new[0]);
echo $result;