Skip to content
Advertisement

Accessing attribute from xml string in php

I have a php application and I am trying to echo a atrribute from the xml.

Here is the xml:

JavaScript

This is what I have tried till now:

JavaScript

But it gives me this errors:

JavaScript

Can someone give me an example to extract from the xml from the beginning of the post the index ? Thanks in advance. I am a newbie in php

Advertisement

Answer

To get a specific attribute you can try like this :

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement