dreamwest Posted September 7, 2009 Share Posted September 7, 2009 Im trying to seperate a group of hyperlinks, but cant seem to do it <a target="_self" href="http://site.com/index.php?q=search">search</a> <a target="_self" href="http://site.com/index.php?q=search2">search2</a> <a target="_self" href="http://site.com/index.php?q=search3">search3</a> Basically i want to strip everything away except what between the hyperlink tags so it looks like this: search search2 search3 Quote Link to comment https://forums.phpfreaks.com/topic/173394-strip-tags/ Share on other sites More sharing options...
thebadbad Posted September 7, 2009 Share Posted September 7, 2009 strip_tags() Quote Link to comment https://forums.phpfreaks.com/topic/173394-strip-tags/#findComment-914056 Share on other sites More sharing options...
bundyxc Posted September 7, 2009 Share Posted September 7, 2009 <?php $oldString = ' <a target="_self" href="http://site.com/index.php?q=search">search</a> <a target="_self" href="http://site.com/index.php?q=search2">search2</a> <a target="_self" href="http://site.com/index.php?q=search3">search3</a> '; $newString = strip_tags($oldString); print($newString); ?> Quote Link to comment https://forums.phpfreaks.com/topic/173394-strip-tags/#findComment-914077 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.