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) </a> <div class="jobdate">posted on 2013-05-10 | by admin | 0 comments | 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
Post a Comment