Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $meses = 3;
- $valor = 1000
- $valor_parcela = $valor / $meses;
- for ($i = 1;$i <= $meses; $i++) {
- $date_sum_month = date('d/m/Y', strtotime("+{$i} month", strtotime($date)));
- array_push($boletos, ["numero" => $i, "vencimento" => date_sum_month, "valor" => $valor_parcela]);
- }
- return json_encode($boletos);
- 1 - 333,333
- 2 - 333,333
- 3 - 333,333
- 1 - 333
- 2 - 333
- 3 - 334
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement