title: PHP simple HTML DOM Parser: getting "Fatal error: Nesting level too deep - recursive dependency?
body: <p>I'm trying to parse a cinema webpage and get the movie schedule for the upcoming days.
  The following code shows what I've done till now:</p>
  
  <pre><code>foreach ($html -&gt; find('div[id*=tabs]') as $days) {
      foreach($days -&gt; find('div[!class]') as $good_days) {
          echo $good_days
          foreach($good_days -&gt; find('a') as $title) {
              if (empty($movie_names)) {          
                  $movie_names[] = $title;
              }
              if (!in_array($title, $movie_names)) {
                  $movie_names[] = $title;
              }
          }
      }
  }
  </code></pre>
  
  <p>If I keep the code at echo $good_days, everything goes smoothly and I get a table-like of the scheduled movies, as shown in the picture:
  <a href="http://i.stack.imgur.com/Dyym9.png" rel="nofollow">echo $good_days</a>
  If I try to get only the names of the movies, I get the first day titles, and as it starts parsing the second I get </p>
  
  <blockquote>
    <p>Fatal error: Nesting level too deep - recursive dependency?</p>
  </blockquote>
  
  <p>on the</p>
  
  <pre><code>if (in_array($title, $movie_names)) {
  </code></pre>
  
  <p>line. I don't get what is wrong with the code and I can't understand the error at all.
  Any suggestion?</p>