php mysqli获取数据并将两个变量分成固定(2)/两位小数

I have been able to divide two variables from a mysqli query... How do i divide the number to two decimal places / toFIxed(2)

php

$Date = $_GET['date'];
    $Win = 'Win';

$testsql="
SELECT 
count(*) AS bet_count,
SUM(IF(result ='$Win', 1, 0)) AS win_count
FROM bets WHERE betDate = '$Date' GROUP BY betDate 
";

$testresult = mysqli_query($connection, $testsql);

while ($testrow = mysqli_fetch_assoc($testresult))
{ 
    echo "<tr>";
echo "<td class='text-center'>".($testrow['bet_count']/$testrow['win_count']). "</td>";
echo "</tr>";
}

So, the bet_count / win_count works as expected.....I just need the integer e.g. 2.371237234 to two decimal places 2.37

You may try with number_format() function:

<?php
$Date = $_GET['date'];
$Win = 'Win';

$testsql = "
   SELECT 
      count(*) AS bet_count,
      SUM(IF(result ='$Win', 1, 0)) AS win_count
   FROM bets WHERE betDate = '$Date' GROUP BY betDate 
";

$testresult = mysqli_query($connection, $testsql);

while ($testrow = mysqli_fetch_assoc($testresult)) { 
    echo "<tr>";
    $value = number_format($testrow['bet_count']/$testrow['win_count'], 2, '.', '');
    echo "<td class='text-center'>".$value."</td>";
    echo "</tr>";
}