title: PHP Get name of a specific html element via get_file_contents
body: <p>I retrieve html of an external page with get_file_contents</p>
  
  <p>In this html code i only need to get the "name" of the 4 firts <code>&lt;a&gt;</code> elements that actualy have a "name".</p>
  
  <p><code>&lt;a&gt;</code> element look like this : </p>
  
  <pre><code>&lt;a name="1991562"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>And i want to display name of 4 firts <code>&lt;a&gt;</code> element like this:
  1991562,1991563,1991564,1991565</p>
  
  <p>Is there a way to do that easily with php ?</p>