I'm currently working with the CakePHP 3.x framework and for a new function I need to extract all <a hrefs="#">#</a>
from a text, but I don't know the best way to do this.
Example:
// String wich contains <a hrefs="#">#</a> tags
$string = "This is a small <a href="#">text</a> to create a <a href="#">example</a>";
// output
Link 1: <a href="#">text</a>
Link 2: <a href="#">example</a>