title: php mysql print months and table content
body: <p>I need to make a list that prints the months and if they're paid or not.</p>
  
  <p>So first I make an array with month names:</p>
  
  <pre><code>$month_names = array("January","February","March","April","May","June","July","August","September","October","November","December");
  </code></pre>
  
  <p>Then I have columns for the twelve months: values 1 for paid 0 for non-paid. So I made a variable to know if it's paid or not:</p>
  
  <pre><code>if ($row['month1'] == '1') {
      $row['month1'] = 'Paid';
  } else $row['month1'] = 'Non-Paid';
  </code></pre>
  
  <p>Is there a better way to do that?</p>
  
  <p>The list will have only two columns: "monthly payments" and "status".</p>
  
  <p>And the while or foreach should be something like:</p>
  
  <pre><code>echo '
      &lt;li&gt;&lt;a class="months"&gt;'$array[$month_names]=&gt;$value'&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a class="status"&gt;'.$row['month1'].'&lt;/a&gt;&lt;/li&gt;
      ';
  </code></pre>
  
  <p>I'm not really sure, how can I do this?</p>
  
  <p>Thank YOU!</p>