date Question
| From: | Randy Johnson | Date: | Mon, 20 May 2002 15:01:12 +0000 |
| Subject: | date Question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98456@lists.php.net to get a copy of this message | ||
Is their a way to retrieve the previous month using/altering the code
below:
// get the current timestamp into an array
$timestamp = time();
$date_time_array = getdate($timestamp);
$month = $date_time_array["mon"];
$day = $date_time_array["mday"];
$year = $date_time_array["year"];
$tmonth= $date_time_array["month"];
outputs
5202002 May
i need it to output
4/20/2002 April
Thanks
Randy