I want to get the content (only the number) of 'count-link' with php:
<div class="left">
<a class="count-link" href="http://url.com">
<span>22</span>
users
</a>
</div>
I have tried this, but it did not work:
$doc = new DomDocument();
$div = $doc->getElementByClass('count-link');
if($div) {
echo $div->textContent;
}