My loop is only returning one value
<p>The issue here is that when I do print_r after I create the array with <code>$picnameoutput</code> it prints the array as you will see in the screenshot.</p>

<p>Later after I run the for loop and echo it just to see the output it only gives me 1 value and I can't figure out why it picks that value, it is not even the first one in the array.</p>

<p>Very Frustrated.</p>

<p>Here is my code</p>

<pre><code>&lt;?php
  $largedir = 'images/headshots/large';
  $large = scandir($largedir);

  $picnameoutput = preg_grep("/adam.*/", $large); 
  print_r($picnameoutput);

  for ($i=0; $i&lt;count($picnameoutput); $i++); {
  echo "$picnameoutput[$i]";
  }
?&gt;
</code></pre>

<p>And here is a screenshot so you can see what I mean</p>

<p><img src="http://i.stack.imgur.com/dFm1V.png" alt="enter image description here"></p>
