I'm trying to create a mantaince script for my photo gallery. What it does is it will search through all the folders of my galleries and delete and files that it comes across that are not in the database and vice versa. The thin that I want to do is query my database for the category's name and id and use the id as the key for the category name the only thing is that I do not know how to create an array in a loop that has keys like this
$someArray = array("key" => $someVal);
I want an array like this so that I can find the folder faste with it's number comes up in a for loop.
also how can I detect the end of an array like in java I think it was array.end() how is that done in php.