note 99017 added to function.uasort

From: Date: Thu, 22 Jul 2010 12:17:42 +0000
Subject: note 99017 added to function.uasort
Groups: php.notes 
Request: Send a blank email to php-notes+get-171040@lists.php.net to get a copy of this message
To sort string containing Umlauts you can use this callback function: function sortWUmlauts($s1, $s2) { $search = array('Ä','Ö','Ü','ß'); $replace = array('A','O','U','s'); return strcmp( str_ireplace($search, $replace, $s1), str_ireplace($search, $replace, $s2) ); } simply call: uasort($array, 'sortWUmlauts'); ---- Server IP: 69.147.83.197 Probable Submitter: 178.25.90.204 ---- Manual Page -- http://www.php.net/manual/en/function.uasort.php Edit -- https://master.php.net/note/edit/99017 Del: integrated -- https://master.php.net/note/delete/99017/integrated Del: useless -- https://master.php.net/note/delete/99017/useless Del: bad code -- https://master.php.net/note/delete/99017/bad+code Del: spam -- https://master.php.net/note/delete/99017/spam Del: non-english -- https://master.php.net/note/delete/99017/non-english Del: in docs -- https://master.php.net/note/delete/99017/in+docs Del: other reasons-- https://master.php.net/note/delete/99017 Reject -- https://master.php.net/note/reject/99017 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171040) next »