title: Store for loop results as a variable in php
body: <p>I have this</p>
  
  <pre><code>    &lt;?php
      $articlesCount = count($articles);
  
      for ($i = 0; $i &lt; $articlesCount; $i++) {
        //would like to store result as a variable for use later
      }
      ?&gt;
  </code></pre>
  
  <p>I would like to store the results of the for loop in a variable so that I can use that variable later to call on the desired information from the loop. At this time the syntax eludes me. Any suggestions would be greatly appreciated.</p>