pulling it out of my ass, but try:
$today = getdate(time()-(60*60*24))
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
----- Original Message -----
From: "Chuck Barnett" <[EMAIL PROTECTED]>
To: "PHP General List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 31, 2001 3:10 PM
Subject: [PHP] today and yesterday (finding them)
> $today = getdate();
> $mon = $today[mon];
> $mday = $today[mday];
> $year = $today[year];
> $text=sprintf("%s-%s-%s", $year, $mon, $mday);
> $date=$text;
>
> This code gets me today in the form 0000-00-00
>
> What do I need to do to get yesterday in that form?
>
> Thanks,
> Chuck
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]