Answers for "php xml decode"

PHP
4

php xml to array

public function xmlToArray($xmlstring){
    
  $xml = simplexml_load_string($xmlstring, "SimpleXMLElement", LIBXML_NOCDATA);
  $json = json_encode($xml);
  $array = json_decode($json,TRUE);

  return $array;

}
Posted by: Guest on August-25-2020
0

php parse xml

$movies = new SimpleXMLElement($xmlstr);

echo $movies->movie[0]->plot;
Posted by: Guest on January-06-2021

Browse Popular Code Answers by Language