in reply to Re^3: Complex conditional sort
in thread Complex conditional sort

The code is part of a larger eCommerce CGI script. While its live, warnings are turned off, therefore it wasn't an issue even if its bad practice. The sort must be able to handle numbers alone, or letters alone, or a combination of both (which I didn't explain properly). That was just my natural attempt to do that. I haven't tried yet, but i'm assuming cmp alone might be able to handle it. Chris

Replies are listed 'Best First'.
Re^5: Complex conditional sort
by ikegami (Patriarch) on Mar 09, 2011 at 07:06 UTC
    If by combination of both, you mean stuff like "abc5def", it's currently being sorted to come after "abc10def".
      I understand. From looking across my website, it looks as though its alright for now, all of the products are being sorted properly. I'll make adjustments if it becomes a problem in the future with varying colour names.