How can proper indentation and formatting of PHP code improve readability and maintainability?

Proper indentation and formatting of PHP code can improve readability and maintainability by making the code structure more clear and organized. This makes it easier for developers to understand the code, identify logical blocks, and quickly locate specific sections. Consistent indentation also helps in debugging and troubleshooting code errors.

<?php

// Badly formatted code
function calculateTotal($price,$quantity){
$total = $price * $quantity;
return $total;
}

// Properly formatted code
function calculateTotal($price, $quantity) {
    $total = $price * $quantity;
    return $total;
}

?>