1

I'm using simple PHP HTML DOM to parse XML, it is that there are several tags with the same values​​, how I can display only the second label?

1 Answer 1

2

I'm guessing from your question you're using PHP Simple HTML DOM? http://simplehtmldom.sourceforge.net/

You should be able to get the second label by doing something like:

// $xml is your DOM object
$tags = $xml->find("label");
echo $tags[1];

If you're not using PHP Simple HTML DOM, let us know which you're using, as it'll be different depending on the code you're using.

Sign up to request clarification or add additional context in comments.

1 Comment

If I forgive, I'm using simple PHP HTML DOM, Thanks your response is the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.