this function function skipURL($string){ $string = preg_replace("`\[.*\]`U","",$string); $string = preg_replace('`&(amp;)?#?[a-z0-9]+;`i','-',$string); $string = htmlentities($string, ENT_COMPAT, 'utf-8'); $string = preg_replace( "`&([a-z])(acute|uml|circ|grave|ring|cedil|slash|tilde|caron|lig|quot|rsquo);`i","\\1", $string ); $string = preg_replace( array("`[^a-z0-9]`i","`[-]+`") , "-", $string); return strtolower(trim($string, '-')); } PHP: this works like what i need. but im haveing a problem this function works good with english language but what if there is any kind of other language like arabic for examble if i have this string with english LOREM _ DolOr :^*( the function going to make like that lorem-dolor but what if there a string like that english :: عربى it's going to be like that english i just want it to be like that english-عربى so please if anyone can help me with this thanks
also not working sorry, the arabic language characters also not showing please if you have any other idea
Set encoding properly to UTF-8 and make use of the mb_strtolower() and mb_string() in combination. I dont know any thing other than that. Also try to set the locale as arabic if needed.
the current php functions not support arabic but you can make strtolower_ar() just use replace functions