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
What would be the best way of doing this? I may want to generate up to 1000 lines like this
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the date classes (note: DateInterval and DatePeriod are only available as of PHP 5.3) to make life easy.
For a less pretty, but available in older versions of PHP, alternative then see the other suggestions recommending mktime.