Jump to content

Bingo card generation


techboy992

Recommended Posts

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 :)

 

 

Link to comment
Share on other sites

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 by techboy992
Link to comment
Share on other sites

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 by techboy992
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.