filter scandir and sort by date created
<ol>
<li>I need to get the files in a directory in an array.
<ul>
<li>Only files that end in .markdown</li>
</ul></li>
<li>The files should be sorted by date created</li>
</ol>

<p>Efficiency is not a <em>huge</em> deal, but I always like to make things as efficient as possible.  There will be multiple directories with up to a couple hundred files in each.</p>

<p>I know I use the <code>scandir</code> function to get the files into an array, but I'm not sure where to go from there.  I could throw it in a loop to check if the files end in <code>.markdown</code>, but is there some sort of regex I could pass in to the scan?</p>

<p>Thanks</p>
