i am trying to get data between two <span...</span>
that has specific color #ff0000 using the following code but i getting no data! could any one tell me what i am doing wrong ?
example of data:
<span style="color: #ff0000;">get this text1</span> |
<span style="color: #ff0000;">get this text2</span> |
<span style="color: #ff0000;">get this text3</span> |
<span style="color: #ff0000;">get this text4</span> |
php code:
if(preg_match_all("/<span style=\"color: #ff0000;\">(.*?)</span>/i", $code2, $epititle))
{
print_r($epititle[2]);
}