Re: Case insensitive ksort

From: Date: Tue, 18 Sep 2007 15:57:33 +0000
Subject: Re: Case insensitive ksort
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-262207@lists.php.net to get a copy of this message
On 18/09/2007, Christoph Boget <christoph.boget@gmail.com> wrote: > I looked in the docs but didn't see anything regarding case > insensitivity and I fear the functionality doesn't exist. I'm just > hoping I'm looking in the wrong place. > > Is there a way to get ksort to work without regard to case? When I > sort an array using ksort, all the upper case keys end up at the top > (sorted) and all the lower case keys end up at the bottom (sorted). > Ideally, I'd like to see all the keys sorted (and intermixed) > regardless of case. Am I going to have to do this manually? Or is > there an internal php command that will do it for me? uksort($array, 'strcasecmp'); -robin

« previous php.general (#262207) next »