On 7 Feb 2002, at 23:21, Sander Peters wrote: > Hello, > > > This is my problem: > > $today = date("Ymd", mktime(0,0,0, date(m),date(d),date(Y))); > $last_week = date("Ymd", mktime(0,0,0, date(m),date(d)-7,date(Y))); > echo ($today - $last_week); The result is a number like 8876 > (20020107-20011231 = 8876) But in date thinking it should be 7! > > How can I let php count in real days/month/years in stead of numbers?
Sanders, I've not prorammed PHP much (Perl), but I looked in the docs and could not find anything. I tested your above code and on my FreeBSD box with PHP Version 4.0.6 it returned 7. Peter Good Perl5/mod_perl/Apache/RDBMS/Unix developer seeking work call 901-652-2002 or email [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]