note 102979 deleted from function.utf8-encode by thiago
| From: | thiago@php.net | Date: | Fri, 18 Mar 2011 19:45:43 +0000 |
| Subject: | note 102979 deleted from function.utf8-encode by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-177988@lists.php.net to get a copy of this message | ||
Note Submitter: ejasoft at gmail dot com
----
hello,
utf-8 is good for yours for arabic urls
like
http://games.astaza.com/Ø§ÙØ¹Ø§Ø¨/
after use
utf8_enocde
and urlencode
will
http://games.astaza.com/%D8%A7%D9%84%D8%B9%D8%A7%D8%A8/
thats better for seo and all browsers
this is my solutions for convert arabic text to utf8 and encode it
function create_url($str)
{
//$str = preg_replace('/\&#\d+\;/', "", $str);
$str = preg_replace('#\s+#', '-', trim(strtolower($str)));
$str = utf8_encode($str);
$str = urlencode($str);
return $str;
}
thanks