title: Using number_format in a loop
body: <p>I am running a for loop 10 times in order to populate data in a data table. In doing this, I wanted to use number_format in order to format the numbers. However, when I apply the number_format the For loop for some reason runs one additional time. </p>
  
  <p>It works just fine when I exclude the number_format. Can anyone explain why this happens?</p>
  
  <pre><code>&lt;?php
    foreach($data['data'] as $result) {
      For ($n = 0; $n &lt;= 10; $n++){
        echo "&lt;td&gt;";
        echo number_format($result[$n], 0, ".", ",");
        echo "&lt;/td&gt;";
      }
    }
  ?&gt;
  </code></pre>