XML : how to fetch anchor tag from XML into PHP

I want to parse XML file into PHP. XML file has bellow code:

  <a href="something">some value</a>    

How to fetch href value in PHP file?

I tried with Load() function and LoadXML() function, and SimpleXML_load_string(), and loadHTML() function, but it is not working.

your help is appreciable.

No comments:

Post a Comment