Re: [PHP] Strange ....Date problem

2002-11-10 Thread Rasmus Lerdorf
Why is it strange? By default strings are sorted alphabetically. 6 > 10 when sorted alphabetically. Convert your strings to numbers in some logical manner and compare numbers or easier, use strnatcmp() to compare the strings directly using a natural alphanumeric comparison. -Rasmus On Sun, 10

Re: [PHP] Strange ....Date problem

2002-11-10 Thread Marco Tabini
I think you should convert them to dates--otherwise the server compares them as strings. Marco -- php|architect - The magazine for PHP Professionals The first monthly worldwide magazine dedicated to PHP programmers Check us out on the web at http://www.phparch.com On Sun, 2002-11

[PHP] Strange ....Date problem

2002-11-10 Thread Dhaval Desai
Hi! If you try this in php: 2002-01-6 > 2002-01-10 returns true 2002-01-6 > 2002-01-9 returns false Jut a leading 0 in the date makes it false...this is really strange.. Any comments? _ Add photos to your messages with MSN 8.