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? Quote 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); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/53686-tags-to-spaces/#findComment-265371 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.