I want to make a PHP script that completes the realization of a random pool. I have the following code, which would make a simple table of 15 rows and 3 columns. I do not know how to randomly mark in each row a 1, X or 2. I tried a rand (1,3), if and so on but did not manage to put it in its correct place so that the result is put in its column correspondent. That is, if 1 comes out, it is placed in column 1 of that row. Can someone help me?
<?php
echo "<table border='1'>";
for ($fila=1; $fila<16; $fila++){
echo "<tr>";
for ($col=1; $col<4; $col++){
echo "<td align='center'>";
}
}
If possible, do not use arrays, just if, switch, loops or functions.