📜  php代码示例中关联数组的总和

📅  最后修改于: 2022-03-11 14:54:50.399000             🧑  作者: Mango

代码示例3
 20,
    2 => 20,
    3 => 5.5,
    4 => "str"
);

echo array_sum($indexedArray) . "
"; // 45.5 echo array_sum($associativeArray); // 45.5 ?>