PHP Questions Home

Categories

Arrays
Files
Forms
Functions
Images
MySQL
Numbers
Others
Strings
Website


PHP Functions

PHP Functions


More PHP

Top Questions
Ask a Question

How do I remove HTML tags from a string?


To do this, pass the string through the strip_tags function, and it'll clean it up for you like so:

<?php
$mystring 
"I said <ignore me then!>you <b>are a little bit</b> whack!";
echo 
strip_tags($mystring);
?>


Which prints:

I said you are a little bit whack!



More forms PHP Questions

How do I check that a valid email address is entered?
How can I check a value entered in a field on my form is a number?
How do I remove escape characters from data?
How can I access information sent through GET on a form?
How can I access information sent through POST on a form?