<?php $totalLoan = "4000000"; $interest= "5"; //<-- 5% $loan = 4; $instalment = $totalLoan / $loan; $priceLoan = $instalment + $totalLoan * $interest / 100; $fixedDateEveryMonth = 28; $start = new DateTime(date('Y-m-') . $fixedDateEveryMonth); for ($i = 1; $i <= $loan; $i++) { $start->add(new DateInterval("P1M")); $dateLoan = $start->format('d-M-Y'); echo "$dateLoan - " . number_format($priceLoan, 0) . "\n"; $priceLoan = $instalment; }
You have javascript disabled. You will not be able to edit any code.