php - preg_match would not execute inside foreach -


i use simple_html_dom.php extract links page.

link example:

sitevision/proxy/platsbanken/svid12_237ec53d11d47b612d78000171/-123388378/standard/platsannonser/visaplatsannonssokdetaljerat.aspx;jsessionid=4e02ab2de23b9e86b1249b2d1c6e5274?q=s%28pf%28fm%2820140601125839%29tm%2820140602125839%29%29%29a%28100%29sp%2814%2c18%29sr%280%2c0%29&ids=5986605&ps=isr%28true%29fi%28-1%29pgi%28400%29 

when links need specific variable link.

preg_match('/29&ids(.*?)&ps=isr(.|$)/is',$href,$addid);

the preg_match not result in inside

foreach($html->find('table.tablelist a[shape=rect]') $e)

but when move outside foreach statement works fine.

could me please one?

// include library include('simple_html_dom.php');          $html = file_get_html($actual_link);          foreach($html->find('table.tablelist a[shape=rect]') $e)         {              $href = $e->href;               preg_match('/29&ids(.*?)&ps=isr(.|$)/is',$href,$addid);               echo $addid = $addid[1];          } 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -