title: convert number of months to the number of years and months
body: <p>I am using a for loop to display numbers 1-60:</p>
  
  <pre><code>for($i=0; $i&lt;=60; $i++)
  </code></pre>
  
  <p>within the loop, i want to be able to show the number of years and months. for example:</p>
  
  <pre><code>1 month
  2 months
  3 month
  ...
  1 year
  1 year 1 month
  1 year 2 month
  </code></pre>
  
  <p>and so on...</p>
  
  <p>i tried this:</p>
  
  <pre><code>if(!is_float($i/12)) {
      $years = $i/12;
  } else {
      $years = 'no';
  }
  </code></pre>
  
  <p>this shows 1 on the 12 month, 2 on 24 months but not the in between</p>