title: Get the src part of a string
body: <p>First post ever here, and i really hope you can help.</p>
  
  <p>I use a database where a large piece of html is stored, now i just need the src part of the image tag.</p>
  
  <p>I already found a thread, but i just doesn't do the trick.</p>
  
  <p>My code:</p>
  
  <p>Original string: </p>
  
  <pre><code>&lt;p&gt;&lt;img alt=\"\" src=\"http://domain.nl/cms/ckeditor/filemanager/userfiles/background.png\" style=\"width: 80px; height: 160px;\" /&gt;&lt;/p&gt;
  </code></pre>
  
  <p>How i start:</p>
  
  <pre><code>$image = strip_tags($row['information'], '&lt;img&gt;');
  echo stripslashes($image); 
  </code></pre>
  
  <p>This returns: </p>
  
  <pre><code>&lt;img alt="" src="http://domain.nl/cms/ckeditor/filemanager/userfiles/background.png" style="width: 80px; height: 160px;" /&gt;
  </code></pre>
  
  <p>Next step: extract the src part:</p>
  
  <pre><code>preg_match('/&lt; *img[^&gt;]*src *= *["\']?([^"\']*)/i', $image, $matches);
  
  echo $matches ;
  </code></pre>
  
  <p>This last echo returns:</p>
  
  <pre><code>Array
  </code></pre>
  
  <p>What is going wrong?</p>
  
  <p>Thanks in advance for your anwser.</p>