The Little Guy Posted May 31, 2007 Share Posted May 31, 2007 I currently have this script: function tagToSpace($text){ return preg_replace("~(<\w>|</\w>)~"," ",$text); } it converts tags to spaces, it just doesn't seem like it is converting image tags though, any way to file it? Link to comment https://forums.phpfreaks.com/topic/53686-tags-to-spaces/ Share on other sites More sharing options...
Lumio Posted May 31, 2007 Share Posted May 31, 2007 try this: <?php function tagToSpace($text){ return preg_replace('/(\<.*?\>)/'," ",$text); } ?> Link to comment https://forums.phpfreaks.com/topic/53686-tags-to-spaces/#findComment-265371 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.