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:
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.