July 17th, 2013, 08:01 PM
Check string format and convert.
$_GET['entry'] is sent to a page and it could be different formats.
How can I check
If the format of $_GET['entry'] is like 'yyyy-mm-dd'
Then change the format like this:
July 17th, 2013, 08:08 PM
Regex to validate the format and grab the pieces (explode() can do that part too), checkdate() to validate the date unless you don't mind over- and underflows with numbers, then the reformatting which you've already answered but could also be done with mktime() since you have the pieces.