adamlacombe Posted August 4, 2010 Share Posted August 4, 2010 I'm trying to work on BBCode for a forum. I have this: <?php $bb_Code = array( '[ code]' => '<code>', '[ /code]' => '</code>' ); foreach ($bb_Code as $value => $replace) { $text = str_replace($value, $replace, $text); } ?> Question is.. how would I get it so when I insert information into the database it gets cleaned (strip_tags, etc.) but doesn't disturb what is in the [ code ] tags? So basically it makes the html, etc. in the [ code ] tags just plain text? Thanks in advanced. Quote Link to comment Share on other sites More sharing options...
adamlacombe Posted August 4, 2010 Author Share Posted August 4, 2010 no ideas? Quote Link to comment Share on other sites More sharing options...
adamlacombe Posted August 5, 2010 Author Share Posted August 5, 2010 Hmmmm..... Quote Link to comment 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.