How can i retrieve the text between two tags with Snoopy PHP Example :
<html>
<body>
<h1> Test </h1>
</body>
</html>
in this example i want get "Test" thanks
Try this code it will give you the result
<?php
$doc =new DOMDocument();
$doc->loadHTML("<html><body><h1>TEst</h1></body></html>");
$xml=simplexml_import_dom($doc);
$h1 = $xml->xpath('//h1');
echo $h1[0];
?>