Ad Code

Ticker

6/recent/ticker-posts

Convert SOAP to JSON in php

SOAP to JSON using php



function soap_to_json($soap)
    {
        list($trash,$soap)=explode('',$soap);
        list($soap,$trash)=explode('',$soap);
        unset($trash);
        $soap=str_replace('xmlns="url"','',$soap);

        $result=simplexml_load_string($soap);
        $json_soap=json_encode($result);
        echo $json_soap;
    }

Post a Comment

1 Comments


  1. My brother recommended I might like this blog. He was totally right. This post actually made my day. You can not imagine just how much time I had spent for this information! Thanks! paypal mastercard login

    ReplyDelete

Ad Code