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

php5.1.6如何解析json

WBOY
Release: 2016-06-13 13:38:48
Original
771 people have browsed it

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 print_r class="clear">
                 
              
              
        
            </strlen>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template