title: php script for web scraping gives me an empty array
body: <p>I'm trying a web scraping with my virtual web server; I'm looking for the name of projects + the name of creator in the page for example Bring THE PEOPLE TO COME to New York City by Yanira Castro</p>
  
  <p>These information are locaded in bbcard_name</p>
  
  <p>My problem is that the array and csv i receive at the end of the script always are empty...</p>
  
  <pre><code>&lt;?php
  
  set_time_limit(0);
  
  $data = array ()
  
  $listpage = file_get_contents('http://www.kickstarter.com/discover/categories/dance/');
  
  preg_match_all('#&lt;h2&gt; &lt;a href="([A-Z]+)\.html"&gt;([a-za-Z ]+)&lt;/a&gt;&lt;/li&gt;#', $listpage, $pagesurl);
  
      foreach($pageurl[1] AS $pagesurl) {
  
      $projectPage = file_get_contents('http://www.kickstarter.com/discover/categories/dance/' . $pagesurl . '.html');
  
      preg_match('#&lt;h2&gt;bbcard_name ([a-zA-Z ]+)&lt;/h2&gt;#', $projectPage, $name);
      $name = $name[1];
  
      preg_match_all('#&lt;h2&gt;&lt;a href="https?://.+\.[a-z]{2,5}"&gt;([^&lt;]+)&lt;/a&gt;#', $projectPage, $namefound);
  
      foreach($namefound[1] AS $name) {
  
          if(!isset($data[$name]))
  
              $data[$name] = array('name' =&gt; $name);
          else
              $data[$name]['name'] .= ' - ' . $name;
      }
   }
  
  print_r($data);
  
  $out = fopen('data.csv', 'w'); 
  fputcsv($out, array('Titre')); 
  
  foreach ($data as $name =&gt; $data) {
      $name = (isset($data['name'])) ? $data['name'] : ''; 
      fputcsv($out, array($data,$name));
  }
  
  fclose($out);
  
  echo "FINITO";
   exit;
  
  ?&gt;
  </code></pre>
  
  <p>Thanks</p>