Results 1 to 6 of 6
October 8th, 2005, 12:20 PM #1strip html
Michael Coley posted somewhere here that this code snippet (below) will remove all html from a specific field (in this case I think it's the desc field)
Does anybody know how to do this in php please?
$desc =~ s/<[^>]*>/ /g;
October 8th, 2005, 12:39 PM #2
$desc = strip_tags($desc);
October 8th, 2005, 12:44 PM #3
Thanks Scot I'll give that a go.
October 8th, 2005, 01:23 PM #4
I've tried adding that bit of script to my import file before the table population duringthe table population and after the table population and it still will not delete the html. Am I doing something wrong or is there a little bit missing?
I added it like this because my fieldname is description and not desc.
$description = strip_tags($description);
I am already using this (below) on the description field will it make any difference?
$replace = array("");
$replace_w = array("");
October 8th, 2005, 08:03 PM #5
To help, Gordon, I'd need to see more of the code.
You can pm it to me if you don't wanto post it. I don't need the whole thing, just a snipet that has the pertinent stuff.
October 8th, 2005, 10:54 PM #6