Foreach in PHP with SimpleXMLElement Object

0

I need access to the information (media_id, media_type, 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
                                                    )
    
asked by anonymous 15.02.2018 / 12:25

0 answers