在php中划分变量值..不起作用


Dividing variable values in php...not working

有人想知道为什么我在这里没有得到任何输出吗?

//我的代码

$numer = $times_positive['positive_occurrence'];
$denom = $times_tested['variable_occurrence'];
$percent_postive = $numer / $denom;
echo "it wins " . $percent_positive . " of the time.";

$numer&denom是数组的值,我认为它是整数。当我回显它们时(在本例中)$numer=25和$demon=50。当我把它们分开时,我应该得到0.5,但它没有输出任何东西。。。

//我的输出:它赢得了当时的

我盯着这个看了好几个小时。。。我知道我可能在这里做一些超级愚蠢的事情,但我需要重新审视一下。

任何帮助都将不胜感激。

发现差异:

$percent_postive = $numer / $denom;
            ^----
echo "it wins " . $percent_positive . " of the time.";
                              ^-----

看到什么不见了吗?