
ross
Staff
/ Moderator

Mar 20, 2009, 9:12 AM
Post #12 of 12
(2279 views)
Shortcut
|
Hi Bob I actually meant to say swap the <p> for <br> instead of completely removing them. On your template, you'll likely have something like this: <?php echo $record['title']' ?> or something like that for each field you are displaying. To replace the <p> tags, try this code:
<?php $record['content'] = preg_replace("/<p>/i", "<br>", $record['content'] ); ?> <?php $record['content'] = preg_replace("/<\/p>/i", "", $record['content'] ); ?> <span><?php echo $record['content']; ?></span> You'll need to use all three lines for each field you want to swap the tags in. You can add a class attribute to the final span tag if you wanted additional styles. Give this a shot and let me know how you make out :). ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting: http://www.interactivetools.com/consulting/
|