OK, is there a reason why you are doing this:
PHP Code:
$srcFile = "$file";
$fileArray = @file($srcFile);
Can you not just do this?
PHP Code:
$fileArray = file($file);
There shouldn't be any need to reset the array either.
You shouldn't surpress errors when you can prepare for them instead. Try checking the file $file exists using the file_exists() function. Put that in an if...else statement, so if the file exists, carry on, if it doesn't, print out an error.
Usually if you are trying to read a file using file() and then you are getting errors about $fileArray not being an array, it sounds like it cannot find the file you are trying to open.
__________________