hi, I am trying to create 7 lines, out of 49 numbers, each line must have unique numbers not seen in any other line so that every number out of 49 has been used in one of those lines, I also need them to be in order, lowest to highest except for the last number which needs to be completely any random ( as long as its not elsewhere in the 7 lines and its one of 49)
I have made an attempt,
<?php
function code(){
for ($i=1; $i<=7; $i++){
$one = mt_rand(1, 49);
echo $one;
echo ' ';
}}
function lines(){
for ($i=1; $i<=7; $i++){
code();
echo '<br/>';
}}
lines();
?>
but I am seriously failing at producing every number from 1 to 49 throughout those 7 lines and of course failing at ordering them with the random at the end that is not in order..
sorry if this sounds confusing but I would appreciate any help, thanks