I want to calculate whats the date 20 yrs back from current time in php.How can do that.I am not able to figure this out in a proper manner. Scenario is:
I am having a column dob in mysql. Now i want to retrieve all the users who age is more than 20yrs and less than 25 yrs. I am using doctrine orm
Edit
Its working fine but giving a warning:
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for '5.5/no DST' instead in C:\xampp\htdocs\fanyer\test.php on line 11 Today: 2010-02-07