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! 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() ;-) 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! 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* 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
Archived
This topic is now archived and is closed to further replies.