Text içinde belirlenecek tagların arasındak değerleri almak
$text='<html>
<title>Merhaba Exc</title>
<body>
<b>Selam Nasılsınız</b>
hehehe
<b>ben</b> sen o
</body>
</html>';
$tags = array("title", "b");
$tag_ = implode("|", $tags);
$pt = "'<($tag_)\b[^>]*>(.*?)</($tag_)>'s";
preg_match_all($pt,$text,$out);
print_r($out[2]);
/*
Array
(
[0] => Merhaba Exc
[1] => Selam Nasılsınız
[2] => ben
)
*/
__________________ |