<?php
$html = '<a href="uploads/tutorial1.pdf">tutorial1.pdf</a>
<a href="uploads/tutorial2.pdf">tutorial1.pdf</a>
<a href="uploads/tutorial3.pdf">tutorial1.pdf</a>';
$dom = new DOMDocument();
$dom->loadHTML($html);
$tags = $dom->getElementsByTagName('a');
foreach ($tags as $tag) {
echo $tag->nodeValue . ": " . $tag->getAttribute('href') . "\n";
}
PD9waHAKCiRodG1sID0gJzxhIGhyZWY9InVwbG9hZHMvdHV0b3JpYWwxLnBkZiI+dHV0b3JpYWwxLnBkZjwvYT4KICAgICAgICAgPGEgaHJlZj0idXBsb2Fkcy90dXRvcmlhbDIucGRmIj50dXRvcmlhbDEucGRmPC9hPgogICAgICAgICA8YSBocmVmPSJ1cGxvYWRzL3R1dG9yaWFsMy5wZGYiPnR1dG9yaWFsMS5wZGY8L2E+JzsKCiRkb20gPSBuZXcgRE9NRG9jdW1lbnQoKTsKJGRvbS0+bG9hZEhUTUwoJGh0bWwpOwoKJHRhZ3MgPSAkZG9tLT5nZXRFbGVtZW50c0J5VGFnTmFtZSgnYScpOwoKZm9yZWFjaCAoJHRhZ3MgYXMgJHRhZykgewogICAgICAgZWNobyAkdGFnLT5ub2RlVmFsdWUgLiAiOiAiIC4gJHRhZy0+Z2V0QXR0cmlidXRlKCdocmVmJykgLiAiXG4iOwp9