title: Using a Loop in PHP to output the month-to-month interest that the user earns based on the principal and interest rate
body: <p>I am attempting to use a loop to calculate the month to month interest rate using PHP. I get an output but the number just repeats itself and the month is not output-ed either. How do I output the month, the interest earned that month, and the new principal balance? </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form action='displayInterest.php' method ='POST'&gt;
      &lt;p&gt;Principal
          &lt;input type = 'text' name ='principal' maxlength='20'/&gt;
      &lt;/p&gt;
      &lt;p&gt;Interest Rate
          &lt;input type='text' name='interestRate' maxlength = '20'/&gt;
      &lt;/p&gt;
      &lt;p&gt;Term
          &lt;input type='text' name='term' maxlength='20'/&gt;
      &lt;/p&gt;
      &lt;input type='submit' value='Calculate Interest'/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>&lt;?php
      $principal = $_REQUEST['principal'];
      $interestRate = $_REQUEST['interestRate'];
      $term = $_REQUEST['term'];
  
      $MIR = $interestRate / 12;
      $MI = $principal / $MIR;
      $MB = $principal + $MI;
  
      $month = array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September','October', 'November', 'December');
  
      for($i = 0; $i &lt; 13; $i++){    
          $MI += $month[0];
          echo($MI);
          echo('&lt;/br&gt;');
      }    
  ?&gt;
  </code></pre>