title: How to use a form to cycle through php array
body: <p>so my basic array code is below. I'm wanting to have a "next" button that will basically display one result at a time on the same page. So when pressed it would replace the current testimonial on the page.  Not really sure how to do this with the array being in php. basically just want it to reload and increment the <code>$current</code>. Any help would be appreciated, thanks.  </p>
  
  <pre><code>$testercount = count($testimonials);
  $current = 0;
  if ($current &lt;= $testercount){
         $t = $testimonials[$current];
      $t['text'] = str_replace("\n", '&lt;br/&gt;', $t['text']);
      $t['text'] = str_replace(chr(146), '\'', $t['text']);
      echo '&lt;div&gt;';
      echo '&lt;p&gt;'.$t['text'].'&lt;/p&gt;';
      echo '&lt;p&gt;'.$t['name'].'&lt;/p&gt;';
      echo '&lt;hr/&gt;&lt;/div&gt;';
  
  }
  </code></pre>