<?php
$a=str_replace(array('<img','<IMG'),'<mip-img',preg_replace("/\sstyle=.*?>/si",">",$navinfor['newstext']));
$a =preg_replace('/onclick=".*?"/is','',$a);
$a =str_replace('<mip-img>','',$a);
$preUrl = '</mip-img>';
$a = preg_replace('#<mip-img.*?>#','$0'.$preUrl,$a);
echo $a;
?>