My trying to make an Ajax call to a PHP function that pulls out data from my database. I've run into a problem though.
My query looks like this
$query = "SELECT * FROM mytable WHERE field LIKE '%$string%'"
Set the connection to use UTF-8:
<?php // MySQLi: $connection = new MySQLi( /* ... credentials ...*/); $connection->set_charset("utf8"); // MySQL: $connection = mysql_connect(/* ... credentials ... */); mysql_set_charset("utf8", $connection); ?>