Jump to content

Script ?


ainoy31

Recommended Posts

Hello-

 

I am trying to extract the Status value out of the following html tag.  In this case, the status is OUT FOR DELIVERY but it could be something else later on.

<tr><td><STRONG>Status:</STRONG></td>
<td align="left">OUT FOR DELIVERY</td></tr>

 

Here is my code that I have tried but it is only etxracting the word 'OUT' out.

if(stristr($line, 'Status:'))
{
preg_match_all('%(?<=<td align="left">)([a-zA-Z]+)%', $data, $matches, PREG_SET_ORDER);
predump($matches);
$status = $matches[0][2];
}

Much appreciation.

Link to comment
https://forums.phpfreaks.com/topic/90496-script/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.