I am creating a jackpot website using real money. It is free to play there, but we will take x% of the total jackpot. I am getting the total jackpot out of different rows in the database. It could look like this:
name | depositedValue
------------------------
Player1 | 50$
Player2 | 20$
..
Some code that maybe can help:
$AllDeposits = $jackpot->getBank();
foreach($AllDeposits as $deposit){
echo $deposit->depositedValue;
}
$cutPercentage = 2;
$cut = ????