codrgii Posted August 23, 2010 Share Posted August 23, 2010 how is it possible to allow someone to do paragraphs when using preg_replace? would someone show a few good examples of hows its done? Quote Link to comment https://forums.phpfreaks.com/topic/211492-preg_replace-and-paragraphs/ Share on other sites More sharing options...
joel24 Posted August 23, 2010 Share Posted August 23, 2010 don't understand what you're after. 'allow someone to do paragraphs' ?? from user input in a text box being posted to the PHP? The preg_replace() function doesn't strip <p> tags unless you instruct it to. Quote Link to comment https://forums.phpfreaks.com/topic/211492-preg_replace-and-paragraphs/#findComment-1102679 Share on other sites More sharing options...
codrgii Posted August 23, 2010 Author Share Posted August 23, 2010 I forgot to add that i'm also using strip_tags with preg, so with these two functions combined how is it possible to do paragraphs whilst using preg and strip_tags? Quote Link to comment https://forums.phpfreaks.com/topic/211492-preg_replace-and-paragraphs/#findComment-1102686 Share on other sites More sharing options...
wildteen88 Posted August 23, 2010 Share Posted August 23, 2010 Use nl2br? Quote Link to comment https://forums.phpfreaks.com/topic/211492-preg_replace-and-paragraphs/#findComment-1102789 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.