PHP: how to create an array of an array of files (aka, an array of scandir)
<p>I'd like to loop through 4 paths, and for each path store that specific path's files in an array. The reason is, I'd like to insert each file title and file path in a database.</p>

<p>So: </p>

<pre><code>$COMICS_path = array('./images/Comics/Charts/', './images/Comics/Life/', './images/Comics/Misc/', './images/Comics/Office/', './images/Comics/Political/');

$COMICS_files = array(scandir('./images/Comics/Charts/'), scandir('./images/Comics/Life/'), scandir('./images/Comics/Misc/'), scandir('./images/Comics/Office/'), scandir('./images/Comics/Political/'));
</code></pre>

<p><code>$COMICS_path</code> seems to output the correct array.</p>

<p>but, $COMICS_files just outputs "ARRAY", when I'm expecting something like:</p>

<p><code>$COMICS_files = (file1.png, file2.png, file3.png, ... file n.png)</code></p>

<p>Is this possible? If not, can anyone direct me to the best way to loop through several folders and retrieve each file?</p>

<p>Thanks!</p>
