KevinM1 Posted June 1, 2007 Share Posted June 1, 2007 I need to extract the text within anchor tags for use in building another hyperlink. In other words, if I have something like this: <a href="http://www.something.php?id=12">Blah blah blah</a> I need to get the 'Blah blah blah' part. I'm thinking that a regular expression is the way to go, but I'm having difficulty seeing how to deal with the stuff in the href attribute. Please help. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/53879-solved-extractng-text-from-hyperlink/ Share on other sites More sharing options...
taith Posted June 1, 2007 Share Posted June 1, 2007 strip_tags() ;-) Quote Link to comment https://forums.phpfreaks.com/topic/53879-solved-extractng-text-from-hyperlink/#findComment-266371 Share on other sites More sharing options...
KevinM1 Posted June 1, 2007 Author Share Posted June 1, 2007 strip_tags() ;-) Sweet, it worked perfectly! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/53879-solved-extractng-text-from-hyperlink/#findComment-266377 Share on other sites More sharing options...
taith Posted June 1, 2007 Share Posted June 1, 2007 no prob *pats himself on the back* Quote Link to comment https://forums.phpfreaks.com/topic/53879-solved-extractng-text-from-hyperlink/#findComment-266379 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.