techboy992 Posted October 15, 2015 Share Posted October 15, 2015 Hello all I have problem I can not figure out how to make a 90 ball bingo card generator I am trying to make a card like this http://www.lees-bingo.co.uk/Bingo_Ticket.jpg in exept it shall be a single card and the numbers should be placed right in the card first colon 1 -9 second colon 10 - 19 third colon 20 -29 fourh colon 30-39 fifth colon 40 - 49 sixth colon 50-59 seventh colon 60 - 69 eightth colon 70 - 79 ninth colon 80-90 there can only be 5 numbers pr row Please someone help me Quote Link to comment https://forums.phpfreaks.com/topic/298619-bingo-card-generation/ Share on other sites More sharing options...
Barand Posted October 15, 2015 Share Posted October 15, 2015 What have you tried so far? Quote Link to comment https://forums.phpfreaks.com/topic/298619-bingo-card-generation/#findComment-1523396 Share on other sites More sharing options...
techboy992 Posted October 16, 2015 Author Share Posted October 16, 2015 (edited) I really not have an idea on this one My problem is to get the emty fields in the array for the preview the 75 plates was easy to make as only needed 5 of this ARRAY: //row2 $len = 5; // total number of numbers $min = 16; // minimum $max = 30; // maximum foreach(range(0, $len - 1) as $i){ while(in_array($num = mt_rand($min, $max), $range)){} $row2[] = $num; } Which give me the result in the end http://kingswildcasino.com/bingo/select_card1.php?gameid=QlJGD7CH But how can get the random numbers to function and leave the emty numbers as blanks in the card ? Edited October 16, 2015 by techboy992 Quote Link to comment https://forums.phpfreaks.com/topic/298619-bingo-card-generation/#findComment-1523418 Share on other sites More sharing options...
techboy992 Posted October 16, 2015 Author Share Posted October 16, 2015 (edited) Damm was not allowed to edit my above answer twise. I really not have an idea on this one My problem is to get the emty fields in the array for the preview the 75 plates was easy to make as only needed 5 of this ARRAY: //row2 $len = 5; // total number of numbers $min = 16; // minimum $max = 30; // maximum foreach(range(0, $len - 1) as $i){ while(in_array($num = mt_rand($min, $max), $range)){} $row2[] = $num; } Which give me the result in the end http://kingswildcasino.com/bingo/select_card1.php?gameid=QlJGD7CH In the database I have a row with 27 colons where the card should be inserted, from the array and leave the blanks emty in the DB. There is 27 fields on the card but there should only be 15 numbers on it sorted as explained above. first colon 1 -9 second colon 10 - 19 third colon 20 -29 fourh colon 30-39 fifth colon 40 - 49 sixth colon 50-59 seventh colon 60 - 69 eightth colon 70 - 79 ninth colon 80-90 But how can get the random numbers to function and leave the emty numbers as blanks in the card ? Edited October 16, 2015 by techboy992 Quote Link to comment https://forums.phpfreaks.com/topic/298619-bingo-card-generation/#findComment-1523422 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.