I did var_dump($filearray) and I get this based on there being 2 directories, as you can see:
array(2) { ["test4"]=> array(15) { [0]=> string(7) " string(115) "//comment out anything not required with a "//" like at the start if this sentance or change falue accordingly \n " [2]=> string(38) "$title = "Gash $gallery Gallery"; \n " [3]=> string(28) "//Require display of exif? " [4]=> string(40) "$exif = 'includes/functions/exif.php'; " [5]=> string(24) "//Require Paypal Cart? " [6]=> string(41) "$paypal = 'includes/paypal/paypal.php'; " [7]=> string(37) "//Password protect - TRUE or FALSE? " [8]=> string(19) "$password = TRUE; " [9]=> string(54) "//Enable / Disable the Guest account - TRUE or FALSE " [10]=> string(16) "$guest = TRUE; " [11]=> string(144) "//Secondary Logon details. If the $guest is commented out, this makes the album only accessable with this username password combo, plus Admin! " [12]=> string(21) "$uname = "example"; " [13]=> string(21) "$pass = "example"; " [14]=> string(2) "?>" } ["test5"]=> array(15) { [0]=> string(7) " string(112) "//comment out anything not required with a "//" like at the start if this sentance or change falue accordingly " [2]=> string(35) "$title = "Gash $gallery Gallery"; " [3]=> string(28) "//Require display of exif? " [4]=> string(40) "$exif = 'includes/functions/exif.php'; " [5]=> string(24) "//Require Paypal Cart? " [6]=> string(41) "$paypal = 'includes/paypal/paypal.php'; " [7]=> string(37) "//Password protect - TRUE or FALSE? " [8]=> string(19) "$password = TRUE; " [9]=> string(54) "//Enable / Disable the Guest account - TRUE or FALSE " [10]=> string(16) "$guest = TRUE; " [11]=> string(144) "//Secondary Logon details. If the $guest is commented out, this makes the album only accessable with this username password combo, plus Admin! " [12]=> string(21) "$uname = "example"; " [13]=> string(21) "$pass = "example"; " [14]=> string(2) "?>" } }
If it helps, this is an example of the file that it is reading:
<?PHP
//comment out anything not required with a "//" like at the start if this sentance or change falue accordingly
$title = "Gash $gallery Gallery";
//Require display of exif?
$exif = 'includes/functions/exif.php';
//Require Paypal Cart?
$paypal = 'includes/paypal/paypal.php';
//Password protect - TRUE or FALSE?
$password = TRUE;
//Enable / Disable the Guest account - TRUE or FALSE
$guest = TRUE;
//Secondary Logon details. If the $guest is commented out, this makes the album only accessable with this username password combo, plus Admin!
$uname = "example";
$pass = "example";
?>