I would like to extract all the urls and titles 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 am able to get all the href thanks to the following regex, but I don't know how to get in addition, the title between the <a></a>
tags ?
preg_match_all('/<a.*href="?([^" ]*)" /iU', $v['message'], $urls);
The best would be to get an associative array like that
[0] => Array
(
[title] => XXX
[link] => http://test.com/blop
)
[1] => Array
(
[title] => XXX
[link] => http://test.com
)
Thanks for your help