Your randomNr array contains 10 elements so
foreach($randomNr as $number)
will give 10 columns. You need to pick a random 6 numbers out of the 10.
Separate the php code from the html.
Use CSS for styling the output.
Example
<?php
$randomNr = range(0,9);
$bingokaart = display($randomNr);
function display ($arr)
{
$result = "";
for ($row = 1; $row < 7; ++$row) {
$rand6 = array_rand($arr, 6);
$result .= '<tr>';
foreach ($rand6 as $n) {
$result .= "<td>$row$arr[$n]</td>";
}
$result .= "</tr>\n";
}
return $result;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Sample</title>
<style type="text/css">
table { border-collapse: collapse; }
td { padding: 2px; }
</style>
</head>
<body>
<table border='1'>
<?= $bingokaart ?>
</table>
</body>
</html>