note 8181 added to asort

From: Date: Wed, 30 Aug 2000 12:05:20 +0000
Subject: note 8181 added to asort
Groups: php.notes 
Request: Send a blank email to php-notes+get-3656@lists.php.net to get a copy of this message
hi the 2d arry sort works good for me, but you should use strtolower() for the right alphabetical order, like this:for ($index = 0; $index < strlen ($s1); $index++) { /** ** $s1 comes after $s2 **/ if (strtolower($s1[$index]) > strtolower($s2[$index])) return ($order); /** ** $s1 comes before $s2 **/ if (strtolower($s1[$index]) < strtolower($s2[$index])) return (1 - $order); } have fun olli http://www.php.net/manual/de/function.asort.php

« previous php.notes (#3656) next »