Foreach statements. Returns error if no match.
Posted: Sun Oct 16, 2005 6:09 pm
I have made a php file manager and in one part I'm using foreach to look for files. The only problem is that if there are no files in a folder(if none have been added yet) then the foreach statement leaves an error. I don't want it to leave an error.
Is there any way to disable it from leaving an error if it doesn't read anything? I don't want to disable errors for the whole page.
Is there any way to disable it from leaving an error if it doesn't read anything? I don't want to disable errors for the whole page.