Problem creating SLUG in codeIgniter

4

Look, I'm developing the portal to my music label, and I'm having a pretty chatinho problem.

I'm recording the news, album names, artist names and so on.

When I register in the DB I play in a field the original artist name and in the other field the name for URL using the url_title function.

The problem is that when the artist name has special accents eg á ê ô í ú à , etc, it saves the name without this character, but without replacing with a e o i u , then the field is empty and the name is incomplete, the URL is not at all friendly.

I've tried using str_replace but I was not successful, it replaced the characters in wrong shapes too.

Can anyone give me a light or some solution?

    
asked by anonymous 23.05.2015 / 08:06

1 answer

2

I managed to solve boys. convert_accented_characters() is the function that I did not know that performs this.

Hugs

    
23.05.2015 / 08:23