This is my PHP code:
if you are just using php echo with no html headers etc., this worked great for me.
$connect = mysqli_connect($host_name, $user_name, $password, $database); mysqli_set_charset($connect,"utf8");