date("F j, Y, ");
gives me
March 10, 2001
what if i want to select last month? means the month before March
select month
Moderator: General Moderators
http://www.php.net/strtotime can be useful to..
Something like this
Code: Select all
echo date("F", strtotime("last month"));- dibyendrah
- Forum Contributor
- Posts: 491
- Joined: Wed Oct 19, 2005 5:14 am
- Location: Nepal
- Contact:
Hope you are looking for this thing :
Code: Select all
<?php
$m = date('m');
$d = date('d');
$y = date('y');
echo date("M-d-Y", mktime(0, 0, 0, $m-1, $d, $y));
?>