0
I need to have access to the information (id_midia, midia_tipo, etc.) within the object array below. How should I proceed?
[midias] => SimpleXMLElement Object
(
[midia] => SimpleXMLElement Object
(
[0] => SimpleXMLElement Object
(
[id_midia] => abcdef
[ds_midia_credi] => gggggg
[ds_midia] => aaaaaaaa
[nm_midia_inter] => imagem_01.jpg
[midia_link] => http://portal.teste///_midias/jpg/2018/02/07/imagem_01.jpg
[midia_tipo] => 2
)
[1] => SimpleXMLElement Object
(
[id_midia] => abcdef
[ds_midia_credi] => gggggg
[ds_midia] => aaaaaaaa
[nm_midia_inter] => video_01.jpg
[midia_link] => http://portal.teste///_midias/jpg/2018/03/07/video_01.mpg
[midia_tipo] => 4
)
The/xml code you have to generate this structure is useful too, edits put pff
– Miguel
To generate this structure I give a print_r($results);
– Diego Albuquerque
@Diegoalbuquerque Miguel meant the code that generates the content of
$resultado
.– Jéf Bueno
foreach($media->media as $key => $data){ echo $data->id_midia}
– Bruno Folle