Get href from $string containing html content

smokeyworm

New Member
I have a string that contains some text and an html link and I need a way to get just the link url without html.Example: \[code\]$content = "New and updated news from @google <a href="http://google.com" rel="external">http://google.com</a>";\[/code\]There is only one html link per \[code\]$content\[/code\], and I need to separate that link out so I can create additional links.Can someone PLEASE point me in the right direction, I feel like im overlooking something trivial.all the best,
 
Back
Top