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.
So:
$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/'));
$COMICS_path seems to output the correct array.
but, $COMICS_files just outputs "ARRAY", when I'm expecting something like:
$COMICS_files = (file1.png, file2.png, file3.png, ... file n.png)
Is this possible? If not, can anyone direct me to the best way to loop through several folders and retrieve each file?
Thanks!
Arrayif you echo it or attempt to use the array as a string (via concatenation, etc).print_r($COMICS_files)to see what's really in there.