Question: I'm making a real simple "backend" (PHP5) for two flash/air-applications. One of them will upload a photo, the backend will save it to a folder, and the second app will poll the backend for new photo's and show them. 

I don't got any access to a database, so the backend has to be pure PHP5 and nothing more. That's why I chose to save the images to a folder (with a timestamp in their names) and use readdir() to get them back. 

This all works like a charm. Nevertheless, I would really like to make sure the backend only returns photo's that are completely uploaded, preventing the second app to try to load an unfinished image. Are there any methods/tricks that I can use to validate a file?

Answer: 
`in_array()` [takes two parameters](http://php.net/manual/en/function.in-array.php): the thing you want to find, and the array to search in.
You want:

```
if ( !in_array($file, $ignore))

```
You're checking for [`in_array`](http://php.net/manual/en/function.in-array.php), but the next questions is: "is *what* in\_array".

in\_array needs a second parameter, in this case `$file`, to look for. You'll need:

```
in_array($file,$ignore);

```