I don't understand this. I need to solve seemingly simple problem, and yet it's beyond my logic. I need to write a function: table_columns($input, $cols) which would output a table(example):
$input = array('apple', 'orange', 'monkey', 'potato', 'cheese', 'badger', 'turnip');
$cols = 2;
Expected output:
<table>
<tr>
<td>apple</td>
<td>cheese</td>
</tr>
<tr>
<td>orange</td>
<td>badger</td>
</tr>
<tr>
<td>monkey</td>
<td>turnip</td>
</tr>
<tr>
<td>potato</td>
<td></td>
</tr>
</table>