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? 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 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
Archived
This topic is now archived and is closed to further replies.