fork(5) download
  1. <?php
  2.  
  3. $parcelas = 3;
  4. $valor = 6999.99; //já usei com e sem double e na mesma
  5. $valorTotal = number_format($valor, 2, '.', '');
  6. $valor_parcela = $valorTotal / $parcelas;
  7. echo 'R$'. number_format($valor_parcela, 2, ',', '.');
Success #stdin #stdout 0s 52488KB
stdin
Standard input is empty
stdout
R$2.333,33