Posts Tagged ‘date’

How to Create a Random Date in PHP

Thursday, February 7th, 2008

While browsing some forums the other day, I came across this question – “How do I find a random date in PHP?”

This is a pretty simple operation, if we make use of a few built-in PHP functions – time(), strtotime(), and date(). In this article, we’ll see how these three can work together to find a random date within a given range.
(more…)