PHP: Cách hiển thị dữ liệu có dấu chuẩn
Để hiển thị dữ liệu có dấu, đặc biệt là dữ liệu load từ AJAX ta làm dạng như sau:
$connect=new MySQLi('tên_host','username','password','database');
mysqli_set_charset($connect,'utf8');
mysqli_set_charset($connect,'utf8');
Ví dụ:
$connect=new MySQLi('localhost','root','','db1');
mysqli_set_charset($connect,'utf8');