Removing p tags from around img tags

4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 26, 2010   (RSS)

Re: [dsternalski] Removing p tags from around img tags

Hi dsternalski,

I don't know if this will help, but here's a short excerpt from my CMSB Cookbook http://www.thecmsbcookbook.com on how to remove<p> tags. It might be a simpler approach.

<!-- remove leading <p>, do this _before_ displaying field value -->
<?PHP $record['yourfieldname'] = preg_replace("/^\s*<p>/i", "", $record['yourfieldname'] ); ?>


Hope it points you in a good direction.

Best,

Jerry Kornbluth
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Re: [gkornbluth] Removing p tags from around img tags

Hi, this worked thanks.

Re: [dsternalski] Removing p tags from around img tags

Glad to hear it.

Jerry
The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php