title: jquery onclick source image from php array
body: <p>I'm very new to PHP and jquery, and am trying to set up an image gallery with thumbnails that when clicked, display a larger image in the div above them.</p>
  
  <p>So far, I have this:</p>
  
  <pre><code>$(function() {
   $('.thumbnail').click(function(e){
    e.preventDefault();
   $("#large").attr('src',"http://something.com/image.jpg");
   });
  });
  </code></pre>
  
  <p>What I want to do is change the image source to be from an array of images.  When someone clicks thumbnail A, for instance, I want it to load the corresponding large image A into the div above the thumbnails.  I have two arrays, one for the thumbnails and one for the larger images.  Seems like a pretty basic thing to do, but like I said, I am totally new at this!</p>
  
  <p>Thanks!</p>