PHP Questions Home
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

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!



ASK A QUESTION

More forms PHP Questions

How do I make a website field mandatory?

How do I escape data that is going into a database?

How do you email the contents of a form to someone?

How do I save text inside a textarea so that it can be updated later?

fsdfsd



Custom Search