I need to make a list that prints the months and if they're paid or not.
So first I make an array with month names:
$month_names = array("January","February","March","April","May","June","July","August","September","October","November","December");
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:
if ($row['month1'] == '1') {
$row['month1'] = 'Paid';
} else $row['month1'] = 'Non-Paid';
Is there a better way to do that?
The list will have only two columns: "monthly payments" and "status".
And the while or foreach should be something like:
echo '
<li><a class="months">'$array[$month_names]=>$value'</a></li>
<li><a class="status">'.$row['month1'].'</a></li>
';
I'm not really sure, how can I do this?
Thank YOU!