What are the common methods for iterating through arrays and performing calculations in PHP?

When iterating through arrays in PHP and performing calculations, common methods include using a `for` loop, `foreach` loop, or array functions like `array_map` or `array_reduce`. These methods allow you to access each element in the array and perform calculations or operations on them.

// Using a for loop to iterate through an array and perform a calculation
$array = [1, 2, 3, 4, 5];
$total = 0;

for($i = 0; $i < count($array); $i++) {
    $total += $array[$i];
}

echo $total;