Advertisement
Guest User

Untitled

a guest
Aug 17th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. $meses = 3;
  2. $valor = 1000
  3. $valor_parcela = $valor / $meses;
  4.  
  5. for ($i = 1;$i <= $meses; $i++) {
  6. $date_sum_month = date('d/m/Y', strtotime("+{$i} month", strtotime($date)));
  7. array_push($boletos, ["numero" => $i, "vencimento" => date_sum_month, "valor" => $valor_parcela]);
  8. }
  9. return json_encode($boletos);
  10.  
  11. 1 - 333,333
  12. 2 - 333,333
  13. 3 - 333,333
  14.  
  15. 1 - 333
  16. 2 - 333
  17. 3 - 334
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement