I would like to extract all the urls and headings from a paragraph of text.
Les <a href="http://test.com/blop" class="c_link-blue">résultats du sondage</a> sur les remakes et suites souhaités sont <a href="http://test.com" class="c_link-blue">dans le blog</a>.
I can get all href thanks to the following regex, but I don’t know how to get an extra name between the <a></a>
tags?
preg_match_all('/<a.*href="?([^" ]*)" /iU', $v['message'], $urls);
It would be best to get such an associative array
[0] => Array ( [title] => XXX [link] => http:
thanks for the help
source share