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
Post a Comment