Reklam

Browsing Tag

Set HTTP header to UTF-8 using PHP

PHP

Set HTTP header to UTF-8 using PHP

This HTML :

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

This PHP:

header('Content-Type: text/html; charset=utf-8');

This Database Only:

mysql_query("SET NAMES utf8");

Meta tag HTML.(probably its already set):

meta charset="utf-8"

header php.(before any output of the HTML):

header('Content-Type: text/html; charset=utf-8')

table-rows-charset(for each row):

utf8_general_ci