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

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!



Comment on this Question and Answer >>>

ASK A QUESTION

More forms PHP Questions

How can I access information sent through GET on a form?

How do I know if magic quotes is switched on?

how to access information sent trough $_GET on functions?

how do i validate the name into form ?

I am having a form. Here, i am submitting the form using java script as its necessary. If the form method is get, i am able to get in redirection page and can get the hidden values in the form. But if the form method is post, i am not able to get those hi



Custom Search