Troy McCormick
02-05-2007, 10:58 PM
Alright...so I'm making this poker web site and I need a bit of help displaying the chips when a bet is made. I currently am able to calculate how many of each denomination is needed to fulfill the bet, but I don't know how to go about displaying them.
My denominations are:
$1, $5, $25, $100, $1000, $5000, $25000, $100000
I then pass the bet amount to a function that provides me this information:
Array
(
[1] => 0
[5] => 1
[25] => 0
[100] => 7
[1000] => 0
[5000] => 0
[25000] => 0
[100000] => 0
)
This shows how many of each chip is needed to be displayed. On the page for this to be displayed I have two rows of ten stacks. Each stack contains six chips. Stacks are labeled from 0 to 9 and chips are labeled from 0 to 5.
I have tried for loops and such but just can't seem to get it to work correctly. Does anyone have any ideas?
Thanks a ton,
Troy
My denominations are:
$1, $5, $25, $100, $1000, $5000, $25000, $100000
I then pass the bet amount to a function that provides me this information:
Array
(
[1] => 0
[5] => 1
[25] => 0
[100] => 7
[1000] => 0
[5000] => 0
[25000] => 0
[100000] => 0
)
This shows how many of each chip is needed to be displayed. On the page for this to be displayed I have two rows of ten stacks. Each stack contains six chips. Stacks are labeled from 0 to 9 and chips are labeled from 0 to 5.
I have tried for loops and such but just can't seem to get it to work correctly. Does anyone have any ideas?
Thanks a ton,
Troy