PHP Array Key encoding?

前端 未结 5 1216
野的像风
野的像风 2020-12-19 13:49

I use a encoded string as a key in array, and also uses the same string as a value in the array, like below code indicates:

$string = \'something in some enc         


        
5条回答
  •  一整个雨季
    2020-12-19 14:12

    Are you viewing it through your browser? Then you need to specify the encoding:

    header('Content-Type: text/plain; charset=UTF-8'); // or BIG5, or whatever

    Are you viewing it in your terminal? Make sure your terminal settings are set to that same encoding.

提交回复
热议问题