How Do I ignore html tags in my text Box Input in php
Moderator: General Moderators
How Do I ignore html tags in my text Box Input in php
How Do I ignore html tags in my text Box Input in php
It depends on what you mean by "ignore"... Do you mean like totally getting rid of them, or converting them something like this?
Code: Select all
<html>- akimm
- Forum Contributor
- Posts: 460
- Joined: Thu Apr 27, 2006 10:50 am
- Location: Ypsilanti Michigan, formally Clipsburgh
PHP.net is a wonderful resource friend, i double checked myself for the correct answer here in a matter of 20 seconds.
This code will evaluate string and remove any HTML tags, but let it be know, it also strips PHP from strings, however I believe this is what you want, otherwise, do as Oren said, ASCII safe characters I found this chart here, it should have everything you need:
http://www.web-source.net/symbols.htm
Code: Select all
<?php
$string = "<h2>" . "hello" . "</h2>";
strip_tags($string);
?>http://www.web-source.net/symbols.htm