“PHP XML a la matriz” Código de respuesta

PHP XML a la matriz

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

  return $array;

}
A.Tsiokos

Convertir el archivo XML a la matriz PHP

$xmlfile = file_get_contents($path);
		$ob= simplexml_load_string($xmlfile);
		$json  = json_encode($ob);
		$configData = json_decode($json, true);
Proud Pigeon

Respuestas similares a “PHP XML a la matriz”

Preguntas similares a “PHP XML a la matriz”

Más respuestas relacionadas con “PHP XML a la matriz” en PHP

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código