note 99017 deleted from function.uasort by cmb

From: Date: Wed, 22 Jun 2016 17:26:30 +0000
Subject: note 99017 deleted from function.uasort by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-205785@lists.php.net to get a copy of this message
Note Submitter: stephan dot hoyer at netresearch dot de ---- To sort string containing Umlauts you can use this callback function: <?php 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: <?php uasort($array, 'sortWUmlauts'); ?>

« previous php.notes (#205785) next »