jonw118 Posted April 30, 2008 Share Posted April 30, 2008 Hello - I have a line of code that displays a product description. Currently it is set to strip tags, but I don't want it to. I've tried to get rid of strip_tags a million different ways, but when I do, it breaks the page. How would you suggest I rewrite this line? Thanks for any help!! <?php echo $lc_text = osc_trunc_string(strip_tags($listing['products_description'], '<a><b><em><font><i><s><span><strong><sub><sup><u>'), MASTER_LIST_DESCRIPTION_LENGTH) . ' '; ?> Link to comment https://forums.phpfreaks.com/topic/103598-help-with-a-strip_tags-line-of-code/ Share on other sites More sharing options...
p2grace Posted April 30, 2008 Share Posted April 30, 2008 Something like this should work <?php echo $lc_text = osc_trunc_string($listing['products_description'], MASTER_LIST_DESCRIPTION_LENGTH) . ' '; ?> Link to comment https://forums.phpfreaks.com/topic/103598-help-with-a-strip_tags-line-of-code/#findComment-530504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.