title: put all imgs from current directory inside array PHP
body: <p>Im trying to put all .PNG files inside an array with its details.</p>
  <p>Here is my code:</p>
  <pre><code>$imgs = glob($path . &quot;*.png&quot;);
  
  $tab_img = [];
  
  foreach($imgs as $value){
      $img_png = imagecreatefrompng($value);
      $tab_img['name'] = $value;
      $tab_img['width'] = imagesx($img_png);
      $tab_img['height'] = imagesy($img_png);
  }
  
  print_r($tab_img);
  </code></pre>
  <p>Here is what is displays :</p>
  <pre><code>Array
  
      (
          [name] =&gt; ./sprite.png
          [width] =&gt; 300
          [height] =&gt; 300
      )
  </code></pre>
  <p>It only takes on image inside the folder when in fact, there is many more...</p>