title: How do I do a Simple PHP Loop repetition
body: <p>Please follow alone, I will explain a simple loop issue. </p>
  
  <pre><code>for($k=1;$k &lt;10; $k++){
      $test= $k;
      echo $test; /// 123456789
  }
  
  echo $test; //// 9
  </code></pre>
  
  <p>as you can see, when I echo $test outside the loop, the results is 9. HOw can one echo $test outside the loop with all $k's values..</p>
  
  <p>example. </p>
  
  <pre><code>for($k=1;$k &lt;10; $k++){
      $test= $k;
  }
  
  echo $test; //// 123456789
  </code></pre>