Hello,
I’m working on a school project and i need to have a permalink field on the db for seo url.
I have a field on db that is name LajmeEmri that include the name of the article and another field LajmeLink that should be the permalink for seo. What i have now is this variable:
But this does not replace non latin chars like ë or ç to latin ones (e and c). Can anoyone help me to make the permalink only with latin chars? I need to replace ë with e and ç with c.
I think you don’t want to use regular expression approach for this. I think what you need is
iconv() with //TRANSLIT option
What it does is it replaces the character that does not exist in your encoding into similar character in your encoding.
If you know that encoding of your original string you would then need to convert it into ISO-8859-1 and use //TRANSLIT option