不能用urlencode轉(zhuǎn)化中文
為啥我這邊用urlencode轉(zhuǎn)化之后的中文是一串%C9%FA%B4%E6%BC%BC%C4%DC這樣的,沒有轉(zhuǎn)化的中文顯示null? {"button":[{"type":"click","name":"%C9%FA%B4%E6%BC%BC%C4%DC","key":"item1"},{"name":null,"sub_button":{"type":"click","name":null,"key":"item2"}},{"type":"click","name":null,"key":"item3"}]}
2016-09-20
輸出之前使用 urldecode
$postJson = urldecode( json_encode( $postArr ) );
var_dump($postJson);