Вы ищете функцию str_replace .
mixed str_replace (mixed $ search , mixed $ replace , смешанный $ subject [, int & $ count ])
<?php
$str = '<p>This is the first line<br /> This is the second line with image <img src="1.jpg" /></p>'
echo str_replace(array('<p>', '</p>'), NULL, $str);
?>