php - Cant retrieve the content with simple html dom -


<div class="divheadercontainer1"> <table width="488" cellspacing="0" cellpadding="0" height="63"> <tbody> <tr> <td height="61"> <a href="jobs/jobdetails.php?recordid=5300"> job vacancy media , production      officer @ international committee of red cross (icrc)&nbsp; </a> <div class="jobdate">posted on 2013-05-10&nbsp;&nbsp;|&nbsp;by admin |&nbsp;0  comments&nbsp;|&nbsp; 379 views </div> </td> </tr> </tbody> </table> </div> 

i tried retrieve href attribute website(www.employmentng.com) code below didnt return anything.

$url='http://www.employmentng.com/index.php?pagenum_jobs=1&totalrows_jobs=5127'; $html = file_get_html($url);  foreach($html->find('div[class=divheadercontainer1]') $container){     foreach($html->find('table td[height]') $table){         foreach($table->find('a') $link{             echo $link-href;         }      } } 

i need on please

you have syntax error there. , error reporting off,

change line

foreach($table->find('a') $link{ 

to line

foreach($table->find('a') $link) { 

edit:

one more error out there:

echo $link-href; echo $link->href; 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -