Jump to content

[SOLVED] easy regex question


dtdetu

Recommended Posts

hello i want to get the 29.31 from this code , the 51 and 29.31 is variable but Industries is stable, can someone show me the pattern pls.

 

<td>Industries</td>
<td>51</td>
<td>29.31%</td>

 

i am using this code but doesnt work

  preg_match("~<td>Industries</td><td>[^*]</td><td>(.*?)</td>~i", $string, $result)  ;
$result = $result{1];
echo $result;

         

 

Link to comment
https://forums.phpfreaks.com/topic/132934-solved-easy-regex-question/
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.