title: Extract part of string with PHP
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/138313/how-to-extract-img-src-title-and-alt-from-html-using-php">How to extract img src, title and alt from html using php?</a>  </p>
  </blockquote>
  
  
  
  <p>This would be an example of string:</p>
  
  <pre><code>$src = '&lt;img src="/avatars/admin.jpg" class="avatar 23 avatar-30 avatar-default" height="30" width="30" style="width: 30px; height: 30px;" alt="avatar"&gt;';
  </code></pre>
  
  <hr>
  
  <p><strong><code>$out</code> should be <code>/avatars/admin.jpg</code></strong></p>
  
  <p>Problem is that <code>/avatars/admin.jpg</code> is path to avatar of current logged user, so it's dynamically changed.</p>
  
  <p>How to get <code>$out</code> in simplest way?</p>