Re: counting with leading zeros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2007-09-26 at 22:39 -0400, brian wrote:
> Robert Cummings wrote:
> > On Wed, 2007-09-26 at 19:10 -0400, brian wrote:
> > 
> >>If my response to that gave you the impression i was
> >>complaining, i assure you that i wasn't. I was simply suggesting
> >>that i was wondering if there was a *much* simpler way to do this, ie.
> >>without using several functions to process the filename. Yes, your
> >>version *does* have some improvements. I'm not disagreeing with you. 
> >>Perhaps i could have been more forthright in my praise for said 
> >>improvements (i'm even going to use some of them--how about that?!)
> > 
> > 
> > Well, I'm not looking for praise... but asking a concise question goes a
> > long way towards meeting your desires.
> 
> How was my question *not* concise? If anything, it was my first reply to 
> you that i could have spent more time on. Once again: your reply was 
> valid, your corrections were taken into consideration, *but* i was 
> simply wondering if there was a more (yes) concise way to do what i 
> wanted. My humble apologies (really).
> 
> >>IOW, i'm not stupid; i'm well aware that 100 comes after 
> >>99 and that it contains 3 digits, not 2, thanks very much.
> > 
> > 
> > Nope, 100 comes *before* 99 when lexically sorting.
> > 
> > You must be new around here.
> > 
> 
> Did i say anything there about lexically sorting? The query i posted 
> here was about counting. That last comment? Yep, counting again. Now 
> you're obviously just trying to be a dickhead. Well done.

When you use sort() the default behaviour is a lexical sort. This is why
the 100th index breaks your system. I'm not trying to be a dickhead,
just pointing out the flaw in your logic. You may be well aware that in
counting 100 comes after 99, but it would seem you are not well aware
that in a lexical sort 100 will come first.

> You must be charming to work with.

Quite.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux