At now i have some code but it ios not working preciely how i want it. At first the code should determine if there shuold be two besides eachother(Like this [] Frans [] Duits)
Then it should determine how many there shoulde be one the left side and how many there should be on the right side .
How can this be done ?
<?php
session_start();
// start de sessie
$_SESSION['taal'] == $_POST['taal'];
// Maken van vrije keuze arrays
$vwoarray = array("Grieks","Latijn","Duits 2","Frans 2","Economie","Aardrijkskunde","Scheikunde 1","Natuurkunde 1");
$havoarray= array("Duits 1","Duits 2","Frans 1","Frans 2","Handvaardigheid","Tekenen","Muziek","Economie 1","Economie 2","Biologie","Scheikunde 1","Natuurkunde 1","Informatica","Maatschappijleer","Manegement & Organisatie","Lo 2");
//vaststellen welke array gebruikt moet worden
if($_SESSION['niveau'] == "havo")
{
$usedarray = $havoarray;
}
else
{
$usedarray = $vwoarray;
}
$numvakken = count($usedarray);
$numcolumn = ceil($numvakken / 8 * 2);
?>
<table cellspacing="10" cellpadding="0" border="0" width="300">
<tbody>
<tr>
<?php
$i = 0;
while ($i <= $numvakken)
{
?>
<td width="10" valign="top"><input type="checkbox" name="vrkeuze" value="<?php echo $usedarray[$i]; ?>"></td>
<td width="140" valign="top"><?php echo $usedarray[$i]; ?></td>
<?php
if($i/$numcolumn != 0)
{
echo "</tr><tr>";
}
$i++;
}
?>
</tr>
</tbody>
</table>