PHP|一段Code
function getTotal($products_costs, $tax)
{
$total = 0.00;
$callback =
function ($pricePerItem) use ($tax, &$total)
{
$total += $pricePerItem * ($tax + 1.0);
};
array_walk($products_costs, $callback);
return round($total, 2);
}
阅读 1.3k
0 条评论
得票时间