Jump to content

SET NAMES and utf-8


Avihai

Recommended Posts

How can I output this code in utf-8??? As for now I get ??? instead of the real text.

The db is set to utf-8 collation (I don't need the whole thing just the encoding fix).

 

$link = mysql_connect('localhost', 'root', '');
mysql_select_db('db', $link);
$sql = mysql_query("SELECT * FROM name");

$result = mysql_query($sql, $link);

 

I know that I should use set names but I just can't figure out how.

 

Thanks,

Avihai

Link to comment
https://forums.phpfreaks.com/topic/86221-set-names-and-utf-8/
Share on other sites

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.