Hi Guys,
I am new here, hope you are all well. I am very new in php. I would like to ask a question.
I am trying to calculate my bets.
Basically you start with 500 EUR, you bet 10 % with avg odds 2. It all fine. How can i run this function 500 times for example with update bankroll?
Please help me, Thank you.
<?php
function betting($bankroll, $betPerc, $odds)
{
$number = rand(0,1);
$bet = $bankroll * $betPerc;
if($number == 1){
return $bankroll = $bet * $odds - $bet + $bankroll;
}else
return $bankroll - $bet;
}
echo betting(500, 0.1, 2);
?>