Hello,
I am trying to fetch values from html tag using preg_match_all function in PHP but I am not able to get the desired value.
Here is my HTML code.
<div><span style="color: rgb(102, 102, 102); font-size: 11px;">Views:</span> 1000</div>
I want to grab 1000 from this html code. What I did is ,
$re = "/<div><span .*>(.*)<\/span>(.*)<\/div>/";
preg_match_all($re, $html, $matches);
But I am not able to get the value in $matches array. What I am doing wrong? Please help me. Thanks in advance.