Powered By Blogger

Monday, July 20, 2015

xml data convert to string and array

$projects = $this->get('/projects');
        if($projects===false) return false;
        $xml = $this->object2array(simplexml_load_string($projects,'SimpleXMLElement',LIBXML_NOCDATA));
        if (isset($xml) && $xml != NULL && !empty($xml['project'])) {
        return $xml['project'];
        }



http://www.w3schools.com/php/func_simplexml_load_string.asp

No comments:

Post a Comment