首頁 > 後端開發 > php教程 > u4effu539f这些请问怎么转成汉字输出

u4effu539f这些请问怎么转成汉字输出

WBOY
發布: 2016-06-23 14:14:37
原創
1769 人瀏覽過

[{"id":"569","label":"iphone \u5165\u8033\u5f0f\u8033\u6a5f "},{"id":"568","label":"iPhone \u91dd (5\u652f)"},{"id":"567","label":"iphone \u91dd "},{"id":"12","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"14","label":"iphone4 to iphone5 adapter \u8f49\u63a5\u982d (\u767d\u8272)"},{"id":"16","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"19","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"33","label":"iphone 4 \u7528\u81c2\u5e36 (\u9ed1\u8272\uff09"},{"id":"36","label":"iphone4 to iphone5 adapter \u8f49\u63a5\u982d (\u767d\u8272)"},{"id":"43","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"}]

请问那些编码怎么转成汉字输出??


回复讨论(解决方案)

$s='[{"id":"569","label":"iphone \u5165\u8033\u5f0f\u8033\u6a5f "},{"id":"568","label":"iPhone \u91dd (5\u652f)"},{"id":"567","label":"iphone \u91dd "},{"id":"12","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"14","label":"iphone4 to iphone5 adapter \u8f49\u63a5\u982d (\u767d\u8272)"},{"id":"16","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"19","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"33","label":"iphone 4 \u7528\u81c2\u5e36 (\u9ed1\u8272\uff09"},{"id":"36","label":"iphone4 to iphone5 adapter \u8f49\u63a5\u982d (\u767d\u8272)"},{"id":"43","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"}]';print_r(json_decode($s,true));
登入後複製

Array
(
[0] => Array
(
[id] => 569
[label] => iphone 入耳式耳?
)

[1] => Array
(
[id] => 568
[label] => iPhone ? (5支)
)

[2] => Array
(
[id] => 567
[label] => iphone ?
)

[3] => Array
(
[id] => 12
[label] => iphone5 仿原??? (NEW)
)

[4] => Array
(
[id] => 14
[label] => iphone4 to iphone5 adapter ?接? (白色)
)

[5] => Array
(
[id] => 16
[label] => iphone5 仿原??? (NEW)
)

[6] => Array
(
[id] => 19
[label] => iphone5 仿原??? (NEW)
)

[7] => Array
(
[id] => 33
[label] => iphone 4 用臂? (黑色)
)

[8] => Array
(
[id] => 36
[label] => iphone4 to iphone5 adapter ?接? (白色)
)

[9] => Array
(
[id] => 43
[label] => iphone5 仿原??? (NEW)
)

)

$s =<<< TXT[{"id":"569","label":"iphone \u5165\u8033\u5f0f\u8033\u6a5f "},{"id":"568","label":"iPhone \u91dd (5\u652f)"},{"id":"567","label":"iphone \u91dd "},{"id":"12","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"14","label":"iphone4 to iphone5 adapter \u8f49\u63a5\u982d (\u767d\u8272)"},{"id":"16","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"19","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"},{"id":"33","label":"iphone 4 \u7528\u81c2\u5e36 (\u9ed1\u8272\uff09"},{"id":"36","label":"iphone4 to iphone5 adapter \u8f49\u63a5\u982d (\u767d\u8272)"},{"id":"43","label":"iphone5 \u4eff\u539f\u6578\u64da\u7dda \uff08NEW)"}]TXT;print_r(json_decode($s, true));
登入後複製
Array
(
    [0] => Array
        (
            [id] => 569
            [label] => iphone 入耳式耳? 
        )

    [1] => Array
        (
            [id] => 568
            [label] => iPhone ? (5支)
        )

    [2] => Array
        (
            [id] => 567
            [label] => iphone ? 
        )

    [3] => Array
        (
            [id] => 12
            [label] => iphone5 仿原??? (NEW)
        )

    [4] => Array
        (
            [id] => 14
            [label] => iphone4 to iphone5 adapter ?接? (白色)
        )

    [5] => Array
        (
            [id] => 16
            [label] => iphone5 仿原??? (NEW)
        )

    [6] => Array
        (
            [id] => 19
            [label] => iphone5 仿原??? (NEW)
        )

    [7] => Array
        (
            [id] => 33
            [label] => iphone 4 用臂? (黑色)
        )

    [8] => Array
        (
            [id] => 36
            [label] => iphone4 to iphone5 adapter ?接? (白色)
        )

    [9] => Array
        (
            [id] => 43
            [label] => iphone5 仿原??? (NEW)
        )

)

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板