Jabop Posted February 26, 2009 Share Posted February 26, 2009 <?php $link=mysqli_connect(SERVER, USERNAME, PASSWORD, DB, '3306'); $res=mysqli_query($link, "SELECT name FROM products_wrappers WHERE name LIKE 'ProductName% Pro Complete"); while($result=mysqli_fetch_array($res)) { echo $result[0]; } echo '<br />'; $res=mysql_query("SELECT name FROM products_wrappers WHERE name LIKE 'ProductName% Pro Complete'"); while($result=mysql_fetch_array($res)) { echo $result[0]; } ?> This code returns: ProductName� Pro Complete ProductName™ Pro Complete Why does mysqli return an invalid character, while mysql returns the valid ™ (trademark) character? Quote Link to comment https://forums.phpfreaks.com/topic/146957-solved-mysqli_fetch_array-vs-mysql_fetch_array/ Share on other sites More sharing options...
Jabop Posted February 26, 2009 Author Share Posted February 26, 2009 Fixed. UTF-8 != utf8 Quote Link to comment https://forums.phpfreaks.com/topic/146957-solved-mysqli_fetch_array-vs-mysql_fetch_array/#findComment-771496 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.