header utf 8 php code example Example: php set header to utf-8 header('Content-Type: text/html; charset=utf-8');