On gists
                czech sorting
                    
                        
                        •
                        
                    
                        PHP
                      
                    czech sorting
                    
                    czech sorting.php
                        Raw
                        #
                    
                        <?php
setlocale(LC_ALL, 'cs_CZ.UTF-8');
header("content-type: text/html; charset=UTF-8");
$arr = explode(",", "č, d, b, a, š, ř, o, x, z, ž, á, s, m");
uasort($arr, "strcoll");
echo "<pre>" . print_r($arr, 1) . "</pre>";