Php – How to convert a utf-8 string to a utf-16 string in PHP

PHPutf-16utf-8

How do I convert a utf-8 string to a utf-16 string in PHP?

Best Answer

mbstring supports UTF-16, so you can use mb_convert_encoding.