Skip to content

How can I get an XML attribute as below using file_get_contents or simplexml_load_file?

How can I get the firstname of the XML below?

I am trying to use file_get_contents or simplexml_load_file and trying to echo the value like


without any luck. Can I have some help please?

enter image description here



I don’t see full xml but I suppose it is:

User contributions licensed under: CC BY-SA
2 People found this is helpful