title: preg_match_all not fetching image src from file in php
body: <p>I have page image.php</p>
  
  <p>where images are kept in container like below :- Note: There are other Images outside container div too.. i just want images from container div.</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;head&gt;
          &lt;title&gt;Image Holder&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;header&gt;
          &lt;a href="#"&gt;&lt;img src="http://examepl.com/logo.png"&gt;&lt;/a&gt;
              &lt;div id="side"&gt;
                  &lt;div id="facebook"&gt;&lt;img src="http://examepl.com/fb.png"&gt;&lt;/div&gt;
                  &lt;div id="twiiter"&gt;&lt;img src="http://examepl.com/t.png"&gt;&lt;/div&gt;
                  &lt;div id="gplus"&gt;&lt;img src="http://examepl.com/gp.png"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/header&gt;      
          &lt;div class="container"&gt;
              &lt;p&gt;SOme Post&lt;/p&gt;
              &lt;img src="http://examepl.com/some.png" title="some image" /&gt;
  
              &lt;p&gt;SOme Post&lt;/p&gt;
              &lt;img src="http://examepl.com/some.png" title="some image" /&gt;
  
              &lt;p&gt;SOme Post&lt;/p&gt;
              &lt;img src="http://examepl.com/some.png" title="some image" /&gt;
          &lt;/div&gt;
          &lt;footer&gt;
              &lt;div id="foot"&gt;
                  copyright &amp;copy; 2013
              &lt;/div&gt;
          &lt;/footer&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and i am trying to fetch only image from my image.php file with preg_match_all, but it returns boolean(false) :(</p>
  
  <p>my php code :-</p>
  
  <pre><code>&lt;?php
  $file = file_get_contents("image.php");
  preg_match_all("/&lt;div class=\"container\"&gt;(.*?)&lt;/div&gt;/", $file, $match);
  preg_match_all("/&lt;img src=\"(.*?)\"&gt;/", $match, $images);
  
  var_dump($images);
  ?&gt;
  </code></pre>
  
  <p>Both the files are in root folder , and now i am getting blank page :(</p>
  
  <p>Any help would be great</p>
  
  <p>Thanks</p>