Answer the question
In order to leave comments, you need to log in
How to parse a specific line from a file?
Hello, I have an xml file with the following content:
<?xml version="1.0" encoding="utf-8" ?>
<xmlDoc>
<document quantity="1">
<reader>
<entry>AB:ГОРОДСКОЙ ЧИТАТЕЛЬ</entry>
<entry>AA:5502d0933967dc713dea44699088b0cf</entry>
<entry>AY:PV6FI</entry>
<entry>AG:N/A</entry>
<entry>AW:READER</entry>
<entry>AX:1988</entry>
</reader>
<list>
<entry codePlace="B001" place="Библиотека" total="1" />
</list>
</document>
</xmlDoc>
$xml = simplexml_load_file('index.xml');
foreach ($xml->document->reader->entry as $entry) {
echo $entry . '<br>';
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question