Hello scripters...

This has probably been addressed already, but I want to be able to change elements like headers, paragraph information within one part of the site and do this using an array of images. For instance, if you were to click on image1, the div that may hold the information, name of image, image description, and price, for example, will change.

Now, I know how to do this using a basic function technique, but I end up having to separate the code for each image, and I would like to store all the information lets say, on a database, and call the information as the user clicks. I know that there is a looping technique to do this, but I can not get it to work properly.

I use PHP to call the information from the database, and then the javascript code eludes me to do this. I hope that this makes sense, and if nor infor is needed, please reply and I will try to answer.