Re: date Question
| From: | Jason Wong | Date: | Mon, 20 May 2002 17:06:06 +0000 |
| Subject: | Re: date Question | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-98473@lists.php.net to get a copy of this message | ||
On Monday 20 May 2002 23:01, Randy Johnson wrote:
> 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
strtotime();
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
Speaking of purchasing a dog, never buy a watchdog that's on sale.
After all, everyone knows a bargain dog never bites!
*/