kc111 Posted December 19, 2011 Share Posted December 19, 2011 Hi everyone, I am having trouble with the last() function in xpath . I want to get the text3. The HTML looks like this: div id="body"> <br> <br> text1 <hr> text2 <br> <br> text3 So far I have: $lastdata= $simplexml->xpath("//div[@id='body']/following-sibling::node [last()]"); This is not working. I would appreciate any help. Thank you in advance, Bill Link to comment https://forums.phpfreaks.com/topic/253488-need-help-with-last-function-in-xpath/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.