title: Extracting data from HTML using Simple HTML DOM Parser
body: <p>For a college project, I am creating a website with some back end algorithms and to test these in a demo environment I require a lot of fake data. To get this data I intend to scrape some sites. One of these sites is freelance.com.To extract the data I am using the Simple HTML DOM Parser but so far I have been unsuccessful in my efforts to actually get the data I need.</p>
  
  <p>Here is an example of the HTML layout of the page I intend to scrape. The red boxes mark the required data.</p>
  
  <p><img src="https://i.stack.imgur.com/crKjc.png" alt="Screenshot of HTML Code on Freelance.com"></p>
  
  <p>Here is the code I have written so far after following some tutorials.</p>
  
  <pre><code>&lt;?php
  include "simple_html_dom.php";
  // Create DOM from URL
  $html = file_get_html('http://www.freelancer.com/jobs/Website-Design/1/');
  
  //Get all data inside the &lt;tr&gt; of &lt;table id="project_table"&gt;
  foreach($html-&gt;find('table[id=project_table] tr') as $tr) {
  
      foreach($tr-&gt;find('td[class=title-col]') as $t) {
          //get the inner HTML
          $data = $t-&gt;outertext;
          echo $data;
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>Hopefully someone can point me in the right direction as to how I can get this working.</p>
  
  <p>Thanks.</p>