How can the PHP code be improved for better readability and maintainability?

Issue: The PHP code can be improved for better readability and maintainability by organizing it into smaller functions with clear names and responsibilities. This will make the code easier to understand, debug, and modify in the future.

// Original code
function calculateTotalPrice($items) {
    $total = 0;
    foreach ($items as $item) {
        $total += $item['price'] * $item['quantity'];
    }
    return $total;
}

// Improved code
function calculateTotalPrice($items) {
    $total = 0;
    foreach ($items as $item) {
        $total += calculateItemTotal($item['price'], $item['quantity']);
    }
    return $total;
}

function calculateItemTotal($price, $quantity) {
    return $price * $quantity;
}