title: How to scroll through an array of pictures with PHP and Javascript
body: <p>I have a sql query that pulls an array that contains file paths to my images. </p>
  
  <p>It is store in the variable <code>$rows</code> and I can access individual paths by indexing throught...</p>
  
  <p>IE.</p>
  
  <pre><code>$rows[0]...$rows[n]
  </code></pre>
  
  <p>How can I utilize java script to step through this. </p>
  
  <p>Final goal is for the picture to appear with a "Next" "Previous" button under it. 
  Hitting next would show the next image (without a refresh)</p>
  
  <pre><code>echo $rows[0]; 
  </code></pre>
  
  <p>would print</p>
  
  <pre><code>images/a.png
  </code></pre>