note 92560 modified in function.uksort by danbrown

From: Date: Wed, 29 Jul 2009 14:01:12 +0000
Subject: note 92560 modified in function.uksort by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-158874@lists.php.net to get a copy of this message
need a case insensitive sort by key function? i did and couldn find it, so: <?php function insensitive_uksort($a,$b) { return strtolower($a)<strtolower($b); } uksort($arr, "insensitive_uksort"); ?> --was-- need a case insensitive sort by key function? i did and couldn find it, so: function insensitive_uksort($a,$b) { return strtolower($a)<strtolower($b); } uksort($arr, "insensitive_uksort"); http://php.net/manual/en/function.uksort.php

« previous php.notes (#158874) next »