It would be more helpful to others, if you'd include some more information on how and why you do things, instead of just showing code.
It would also be helpful if the $img array is filled with all files from your images folder. You can do this easily with glob .
pritaeas
Posting Expert
5,483 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875