I have the following PHP code:
$todaysdate = date_create();
for ($i = date_sub(date_create(),date_interval_create_from_date_string("1 month")); $i <= $todaysdate; $i = date_add($i,date_interval_create_from_date_string("1 day"))) {
$json['message'][] = $i;
}
The counter $i doesnot increment at all. $i remains at Object { date="2017-03-02 20:00:55.000000", timezone_type=3, timezone="Asia/Kolkata"}