Generate incrementing date strings

前端 未结 5 455
没有蜡笔的小新
没有蜡笔的小新 2021-01-26 06:03

I need to generate a string of incrementing dates, something like this:

(year, month, day, hour, minute)
2010, 2, 12, 11, 30
2010, 2, 12, 11, 31
etc
5条回答
  •  春和景丽
    2021-01-26 06:39

    I would suggest checking out PHP's built-in functions: date and mktime. Used together you can achieve what you want.

    As an example to increment the day taken directly from the website.

    
    

提交回复
热议问题