Mysql
 sql >> Database >  >> RDS >> Mysql

Codifica PHP MySQL utf 8

Imposta la connessione per utilizzare UTF-8:

<?php

// MySQLi:

$connection = new MySQLi( /* ... credentials ...*/);
$connection->set_charset("utf8");


// MySQL:
$connection = mysql_connect(/* ... credentials ... */); 
mysql_set_charset("utf8", $connection);

?>