Hello!!


I have a question about URL encoding, hope you help


I use language is Vietnamese, I was looking for a better url structure of our language. but I encountered a difficulty, which is that I do not know how to adjust it, please help me


For example,


http://demo.idocscript.com/doc/956/h...ng-und-dn.html


I want the same url


http://demo.idocscript.com/doc/956/huong-&-dan.html


Or for example:


http://demo.idocscript.com/doc/955/h...ng-dn-b2b.html


I want to be like that url:


http://demo.idocscript.com/doc/955/huong-dan-b2b.html


A number of Latin characters changed in our language:


Code:
$translite_simbols = array (  
'#(||ạ|ả|||ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)#',  
'#(||ẹ|ẻ|ẽ||ề|ế|ệ|ể|ễ)#',  
'#(||ị|ỉ|ĩ)#',  
'#(||ọ|ỏ|||ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)#',  
'#(||ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)#',  
'#(ỳ||ỵ|ỷ|ỹ)#',  
'#(đ)#',  
'#(||Ạ|Ả|||Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ)#',  
'#(||Ẹ|Ẻ|Ẽ||Ề|Ế|Ệ|Ể|Ễ)#',  
'#(||Ị|Ỉ|Ĩ)#',  
'#(||Ọ|Ỏ|||Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ)#',  
'#(||Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ)#',  
'#(Ỳ||Ỵ|Ỷ|Ỹ)#',  
'#(Đ)#',  
"/[^a-zA-Z0-9\-\_]/",  
) ;  
$replace = array (  
'a',  
'e',  
'i',  
'o',  
'u',  
'y',  
'd',  
'A',  
'E',  
'I',  
'O',  
'U',  
'Y',  
'D',  
'-',  
) ;  
$fragment = preg_replace($translite_simbols, $replace, $fragment);  
$fragment = preg_replace('/(-)+/', '-', $fragment);
Thank you!