title: Parse all items with PHP Simple HTML DOM Parser
body: <p>I'm trying to parse DOM with Simple HTML DOM Parser in PHP. Parsed content are movies, so I want to get every genre there is, but when i run my code I only get the last genre, not all. My code looks like this: </p>
  
  <pre><code>if ($obj) {
      foreach($obj as $key =&gt; $data) {
          $item['url'] = 'http://geo.saitebi.ge/movie/' . $page;
          $item['poster'] = 'http://geo.saitebi.ge/web/ka/img/movies/' . $page . '/240x340/' . $page . '.jpg';
          $item['geotitle'] = $data-&gt;find('div.movie-item-title', 0)-&gt;plaintext;
          $item['englishtitle'] = $data-&gt;find('div.movie-item-title-en', 0)-&gt;plaintext;
          $item['year'] = $data-&gt;find('div.movie-item-year', 0)-&gt;plaintext;
          foreach($data-&gt;find('a.movie-genre-item') as $genre) {
              $item['genres'] = $genre-&gt;plaintext . ', ';
          }
          $item['description'] = $data-&gt;find('div.movie-desctiption-more', 0)-&gt;plaintext;
          $item['imdb_rating'] = $data-&gt;find('a.imdb_vote', 0)-&gt;plaintext;
          $item['imdb_id'] = trim(substr($data-&gt;find('a.imdb_vote',0)-&gt;href, strrpos($data-&gt;find('a.imdb_vote',0)-&gt;href, '/') + 1));
      }
  }
  </code></pre>
  
  <p>As you see I'm getting content as array. Then inside it I run another foreach loop to get all genre items but it only gets last genre item. What is wrong in my code?</p>