I'm in the process of making a bank statement, how do I make the black fields in random? I have this code to make the numbers in random
$source = range(1, 90);
shuffle($source);
$plader = array();
for ($p = 0; $p < 3; $p++) {
$tal = array_slice($source, 0, 15);
$source = array_slice($source, 15);
sort($tal);
$r = 0;
$plade = array();
foreach ($tal as $number) {
$plade[$r][] = $number;
$r++;
$r %= 3;
}
$plader[] = $plade;
}
if (isset($_GET["bp"])) {
$i = 0;
foreach ($plader as $plade) {
$i++;
echo "<div class='plade'><b>Plade $i:</b>";
foreach ($plade as $raekke) {
echo "<div class='tr' id='td'>";
foreach ($raekke as $tal) {
echo "<div class='number'><p> $tal </p></div>\n";
}
echo "</div>";
}
echo "</div><br />";
}
}
Aucun commentaire:
Enregistrer un commentaire