[PHP] image upload

Hi there… for now i’m working on a content management system for my website.
In there is an option to upload a small and a big image.

i want to change that into a small image and several bigger images to include in an array.
But how?

At this moment i use the temp_name and give the images the name Project_$id_big.jpg

but what if i like to add them in an array? how do i make them unique? add a variable $subid? and give the picture the name project+$id_big_$subid.jpg?

Or a whole new add in my database table wich saves the name of the images…

I created the cms form several files i found at my work, in books and on the internet. But i don’t know how to handle this issue. does someone can give me the answer what to do best to resolve this problem.

Kind regards Jos