I have the following code
$input = '<!DOCTYPE html>
<html>
<head>
<title>My Page</title>
</head>
<body>
<a class="class1 class2" href="link-to-web1.html">Link</a>
<a class="class1 class2" href="abc/link-to-web1.html">Link</a>
<a class="class1 class2" href="abc/xyz/link-to-web1.html">Link</a>
<a class="another" href="abc/xyz/link.html">Link</a>
</body>
</html>';
I got this string after using curl. Then I wanna get all link (href link) of all a tag with class 'class1 class2', how to do that? I had tried some method but it's not work :(