Possible Duplicate:
PHP last day of the month
I have to set an expiry date to my application.
First user have to select a duration of listing, for eg its 1 year and today is 25-Nov-2012
Then we have to add this 1 year to current date and automatically set expiry date as its month end. ie expiry date will be 30-Nov-2013
If current date is 04-Oct-2012 and select 1 year duration, then expiry date is 31-Oct-2012.
I success in add one/two/ whatever years to the current date, but how to find out its month end ?