php - Obtain text between p tags within only certain span IDs with DOMdocument or SimpleDOM? -


i trying pull plaintext between <p> tags if between span id='a' , span id='b'. simpledom seems work, , i've yet find way coax domdocument produce output @ all.

maybe can you:

$doc = new domdocument();    @$doc->loadhtml($html);    $xpath = new domxpath($doc);   $elements = $xpath->query("//*/p/span[@id='a']"); 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -