title: Display more elements with simple html dom
body: <p>How do I display more elements with simple_html_dom? The code I have right now works great, but.... It only loops the portfolio-caption. I want to display more items then Caption / Category. My problem is, the items I want to display are not in the div with the class portfolio-caption ( it's outside the div ). I tried to replace portfolio-caption with body but then it only loops once.</p>
  
  <pre><code>// Include the php dom parser    
  include_once 'simple_html_dom.php';
  
  // Create DOM from URL or file
  
  $html = file_get_html('http://blackrockdigital.github.io/startbootstrap-agency/');
  $items = array();
  // Find all links 
  foreach($html-&gt;find('div.portfolio-item .portfolio-caption') as $element) {
      $items[] = array(
          'Caption' =&gt; $element-&gt;find('h4', 0)-&gt;innertext,
          'Category' =&gt; $element-&gt;find('p', 0)-&gt;innertext
      );
  }
  
  foreach($items as $result){
      echo $result['Caption'];
      echo $result['Category'];
  }
  </code></pre>
  
  <p>I don't have a idea how to do it. Maybe make a foreach for every element? But that is a mess.</p>