當前位置:成語大全網 - 新華字典 - php如何解析json

php如何解析json

用json_decode函數將json字符串轉換為數組

<?php

$json = '{"multi-i1ndex-style":{"old":{"0.1":"123","0.2":"234"}}}';

echo "<pre>";

print_r(json_decode($json, true));

echo "</pre>";