View Full Version : find replace in PHP
kryptech.net
01-23-2004, 11:48 AM
I have built my own forum and have found that if you post the HTML in a post it will show up im using MySQL and PHP 4 I would like to be able to find the "<" character and replace it with the ">" character or whatever the tag is for the "<" tag. I know how to do it in Perl but can someone tell me how to do it PHP?
gold_dragon
01-23-2004, 02:03 PM
Originally posted by kryptech.net
I have built my own forum and have found that if you post the HTML in a post it will show up im using MySQL and PHP 4 I would like to be able to find the "<" character and replace it with the ">" character or whatever the tag is for the "<" tag. I know how to do it in Perl but can someone tell me how to do it PHP? There is a function that can tell if a tag is html and allow you to do something with it. So do you want to take out those takes or do you want to display it for people? Check the PHP documentation.
CFJohn
01-23-2004, 04:03 PM
Check out the documentation for html_special_chars() on php.net... that will take care of that for you....
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.