title: How can i get a Foreach loop to repeat 10 times?
body: <p>I have made the following 'foreach' which i need to make loop 10 times then stop. I cannot use a for command.</p>
  
  <pre><code>&lt;?php
  $x=array("Seb","Ginna","Shane","Guy","Jackie","Frances","John","Alec","Jon","Sam","Chris","Paula");
  foreach ($x as $value)
  {
  echo $value . ",";
  }
  ?&gt;
  </code></pre>
  
  <p>Prvious to this i used:</p>
  
  <pre><code>&lt;?php
  $theNames = array('Seb', 'Ginna', 'Shane', 'Guy', 'Jackie', 'Frances', 'John', 'Alec', 'Jon', 'Sam', 'Chris', 'Paula');
  
  $toOutput = implode(",", $theNames);
  
  for ($i=0; $i &lt; 10; $i++) { 
  print $toOutput."&lt;br/&gt;";
  }
  ?&gt;
  </code></pre>
  
  <p>The previous code works the way i want it to however i need it to work in a foreach loop</p>