date('Y-m-d', time()- 60*60*24);

You could also use mktime.

Regards,
Lucian

"Madcat" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hi there
>
> how do i make php give me yesterday's date?
>
> i tried
>
> date("Y-m-d")-1
>
> but if today would be the 1st of july (2004-07-01), yesterday would be 00.
> july (2004-07-00) according to that calculator.
> is there any way to make this one get it right? without any if-structures
if
> possible
>
> regards

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to