0

how do i get the value of [@attributes] ?? what's the syntax in php?

                    [4] => SimpleXMLElement Object
                    (
                        [Text] => Zoltán Stieber
                        [Url] => https://en.wikipedia.org/wiki/Zolt%C3%A1n_Stieber
                        [Description] => Zoltán Stieber (Hungarian pronunciation: [ˈzoltaːn ˈʃtiːbɛr]; born 16 October 1988) is a professional Hungarian footballer who plays for 1. FC Kaiserslautern and the Hungary national football team.
                        [Image] => SimpleXMLElement Object
                            (
                                [@attributes] => Array
                                    (
                                        [source] => https://upload.wikimedia.org/wikipedia/commons/thumb/6/61/1_Zolt%C3%A1n_Stieber_%28cropped%29.jpg/50px-1_Zolt%C3%A1n_Stieber_%28cropped%29.jpg
                                        [width] => 50
                                        [height] => 39
                                    )

                            )

                    )
Francesco
  • 24,839
  • 29
  • 105
  • 152

1 Answers1

0

Check the documentation here http://php.net/manual/en/class.simplexmlelement.php

use attributes method

Raaghu
  • 1,956
  • 1
  • 19
  • 17