I have this code
$begin_date_2021_2022='01-09-2021';
for ($i=0; $i <5 ; $i++) {
$begin_date_2021_2022=date('d/m/Y',strtotime('+1 month', strtotime($begin_date_2021_2022))) ;
echo $begin_date_2021_2022."<br>";
}
Output:
01/10/2021<br>
10/02/2021<br>
02/11/2021<br>
11/03/2021<br>
03/12/2021<br>
My expectation is
01/10/2021<br>
01/11/2021<br>
01/12/2021<br>
01/01/2022<br>
01/02/2022<br>
Where is the problem?