Find date and month


find any previous month
echo date(“Y-m”, strtotime(“-13 months”));
2014-08

find any previous month
echo date(“Y-m”, strtotime(“-1 months”));
2015-08

find last month
echo date(‘m’, strtotime(‘last month’));
08

last date of any month
$a = strtotime(‘2012-2-1’);
echo date(‘t’, $a);
29

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s