Son aktivite 7 months ago

Extract text between two tags.php Ham
1$tag = "p";
2$html ="I am here!";
3$dom = new domDocument('1.0', 'utf-8');
4 $dom->loadHTML($html);
5$dom->preserveWhiteSpace = false;
6
7$findTag = $dom->getElementsByTagName($tag);
8
9echo $findTag->item(0)->nodeValue;