Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- usort($customers_list, function($a,$b) use ($sortby_name){
- $a_temp = mb_strtolower($a[$sortby_name]);
- $b_temp = mb_strtolower($b[$sortby_name]);
- if(preg_match_all("/Đ/", $a_temp) || preg_match_all("/đ/", $a_temp)){
- $a_temp = str_replace('đ', 'dz', $a_temp); // str_replace('/\đ/g', 'd', );
- }
- if(preg_match_all("/Đ/", $b_temp) || preg_match_all("/đ/", $b_temp)){
- $b_temp = str_replace('đ', 'dz', $b_temp); // str_replace('/\đ/g', 'd', );
- }
- return iconv('UTF-8', 'ASCII//TRANSLIT', $a_temp) > iconv('UTF-8', 'ASCII//TRANSLIT', $b_temp);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement