<h2>Expected Pay <i>Between CutOff Period</i>:
<?php $Query = $Database->prepare("SELECT `Hours`,`BaseRate` FROM `hours`");
$Query->execute();
$Query->bind_result($HoursWorked, $Rate);
$Hours_Arr = array();
while ($Query->fetch()){
$Hours_Arr[] = $HoursWorked;
}
$Query->close();
echo round(count($Hours_Arr)*$Rate);
?>
</h2>
<h1>list Of Worked Hours</h1>
<?php
$Query = $Database->prepare("SELECT `DateWorked`,`StartTime`,`EndTime` FROM `hours`");
$Query->execute();
$Query->bind_result($DateWorked,$Started,$Finished);
while ($Query->fetch()){
echo "Date Worked: ".$DateWorked." Started At: ".$Started." Finished At: ".$Finished."<br>";
}
$Query->close();
?>
使用上面的代码......我有一个问题:
echo count($Hours_Arr)*$Rate;
哪个输出:
14.94000005722
这不是一个有效的支付点。我希望这是一个实际的数字格式,但我不知道如何让这个整数成为:
00.00 英镑