Skip to content
Advertisement

How to search in XML? (PHP)

I am working on a word application. I’m trying to get values from XML. My goal is getting the first and last letter of a word. Could you help me, please?

JavaScript

PHP code:

JavaScript

Advertisement

Answer

The letter is in an attribute named ‘category’.

JavaScript

Or in SimpleXML

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