if (count($arText) > 1) {
foreach ($arText as $l) {
$l = $l."</div>";
if (strpos($l, $condition, 0) !== false) {
$l = str_replace("h2;", "p" , $l);
}
}
}
<img>
? $o = preg_replace('/(<img\s.*\ssrc=".*?)h2_(.*?)"/', '$1p_$2', $s);