Jump to content

[SOLVED] mysqli_fetch_array vs mysql_fetch_array


Jabop

Recommended Posts

<?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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.