I need to divide the value 6999.99 by 3, but when dividing it returns 2333.00 or does not return the cents, a hypothetical example follows:
$parcelas = 3;
$valor = double(6.999,99); //já usei com e sem double e na mesma
$valorTotal = number_format($valor, 2, '.', '');
$valor_parcela = $valorTotal / $parcelas;
echo 'R$'. number_format($valor_parcela, 2, ',', '.');
The value is already formatted from the input with a javascript mask, if you pass the value of this form 6999.99, it is printed correctly. Thanks