How to write "Ni Hao" ("Hello") in Chinese to standard output using UTF-8 in PHP

1 Answer

0 votes
// Set the content type to UTF-8
header('Content-Type: text/html; charset=utf-8');

// Output "你好" to standard output
echo "你好";



/*
run:

你好

*/

 



answered Aug 16, 2025 by avibootz
...