Home >Backend Development >PHP Tutorial >php5.1.6如何解析json

php5.1.6如何解析json

WBOY
WBOYOriginal
2016-06-13 10:14:35897browse

php5.1.6怎么解析json
服务端得到一段json数据 我想把json数据转换为数组 但 5.2以下版本的php不支持 json_decode()函数  
求解决办法

------解决方案--------------------
可以自已循环拼接啊!
------解决方案--------------------
帮你找了段,凑合用吧

PHP code
function _json_decode($json){    $comment = false;    $out = '$x=';    for ($i=0; $i<strlen if .=" array(" else eval return world class="clear">
                 
              
              
        
            </strlen>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn