i need an array of dates which i have listed below
for ($i = 1; $i <= 10; $i++) {
$due_dates_array[$i] = $loan_date;
$loan_date = $loan_date->copy()->addMonth();
$after_adding_day = $loan_date->day;
if ($before_adding_day != $after_adding_day) {
$loan_date = Carbon::parse($after_adding_day.'-'.$loan_date->month.'-'.$loan_date->year);
}
need an output like this
"1": "2019-07-31T04:37:39",
"2": "2019-08-31T04:37:39",
"3": "2019-09-30T18:30:00",
"4": "2019-10-31T18:30:00",
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire