create the function in the document head to perform each string conversion, for example:
<?php
function convertString($string) {
$retStr = $string;
$retStr = str_replace(array("<p>","</p>"), "", $retStr);
$retStr = preg_replace("/<a href=\"(.*)\">/i", " ", $retStr);
$retStr = preg_replace("/<img[^>]+\>/i", " ", $retStr);
return $retStr;
}
?>
the you can call the function in the echo statement tag:
<?php echo(convertString($row_BlogRS['BlogContent'])); ?>