Hi,
I'm trying to remove p tags from img tags. The code I have is:
<div class="topFeature">
<?php
$content = $featureRecord['content'];
$regExp = "/<p>.*?(<img.*?)<\/p>/";
preg_match($regExp, $content, $aImg);
echo $aImg[1];
echo $content;?>
</div>
This works to a point, but it duplicates the image.
Any suggestions would be highly greatful!
Thanks.