转换表ascii php中的特殊字符

I want to make a search the database, where the user will type the word you want to search, a query is made, and if the word is found it shows the result.

Let's imagine that you want to search used the word "líder". In the database, I have the word "líder" saved as "l& iacute;der".

To search'm doing the following query:

$search = htmlentities($search_user);
$result = mysql_query("SELECT * FROM paginas WHERE content like '%$search%'");

the query says it found no results.

have also experimented with htmlspecialchars and my database is utf8_general_ci as well.

problem resolved:

$search = htmlentities($search_user, ENT_QUOTES, 'UTF-8');

thanks!

Convert your search string to UTF8 before you search.

$search = utf8_encode($search);