Best way to do se friendly urls?
View Single Post
01-28-2008, 12:31 AM
Join Date: Apr 2007
Originally Posted by
I know I can do string to lowercase and ' ', '-' replace, but what else can I add for weird symbols like é etc... Whats the easiest way to go round this?
The easiest way (that I can think of right now) to deal with accented characters would be to build some sort of translation table which specifies which ASCII character any given accented character should be converted to. For example,
array('à' => 'a', 'é' => 'e' ... 'Ź' => 'Z')
. There might be a lot of characters to consider but you'd only have to construct the translation table once.
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe