bccamp
Technical User
- Jan 20, 2005
- 69
I've got data that I'm trying to strip the HTML and get just the Text.
I just want the Text, buy strip_tags is not pulling anything out. This was on the manual page:
but it doesn't work for me either.
didn't work. I've looked at the manual pages, tried the suggestions, but nothing is taking out the coding. Is there a better way, or am I missing something?
Thanks.
Code:
<a href="coding">Text</a>
Code:
$string = preg_replace('/<a\s+.*?href="([^"]+)"[^>]*>([^<]+)<\/a>/is', '\2 (\1)', $string);
Code:
$string=strip_tags($string)
Thanks.