# \[php\] Stripping html characters

**URL:** <https://forum.kirupa.com/t/php-stripping-html-characters/48666>\
**Category:** programming\
**Created:** [April 15, 2004, 5:03pm UTC](https://forum.kirupa.com/t/php-stripping-html-characters/48666 "2004-04-15T17:03:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [April 15, 2004, 5:03pm UTC](https://forum.kirupa.com/t/php-stripping-html-characters/48666/1 "2004-04-15T17:03:57Z")

</div>

Hey everyone,  
I’m adding a comment form to my blog, but I don’t want people to be able to break my blog by entering html or php or any other code. So I need to know if there is a function that converts special characters such as \< or \> or / etc. into their form that’s like &whatever;  
I hope that made sense, I don’t know the proper words for some of the things I was talking about so that might have been hard to follow.  
I guess if I really have to I can just do a str\_replace on \< and \> but I’d like to know if there’s a more effective way.

Thanks :pleased:
