-6

I am looking for a solution to screen html tags. Stack Overflow has some of the basic html allowed but I am looking for a solution for my website. I also need it to be in PHP.
I remember seeing something on google but I can't seem to find it after goggling a lot today.

user2574350
  • 1,383
  • 3
  • 10
  • 7
  • Please post any code or specific ideas that you've come up with, and we'll be glad to to help – Brian Phillips Jul 12 '13 at 13:32
  • Very glad, indeed. Right? @bphillips201 – Mohammad Areeb Siddiqui Jul 12 '13 at 13:32
  • http://stackoverflow.com/a/5512756/2536029 – mnagel Jul 12 '13 at 13:33
  • 1
    Unfortunately, your question is probably about to be closed. Here's why. ***Per the flagging menu***: _Questions asking us to recommend a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it._ Consider reading the [help](http://www.stackoverflow.com/help) section before posting. – War10ck Jul 12 '13 at 13:34

1 Answers1

2
    // Allow <p> and <a>
echo strip_tags($text, '<p><a>');

http://php.net/manual/en/function.strip-tags.php

Neeraj
  • 180
  • 9