In what ways can proper code indentation and formatting impact the functionality and maintainability of PHP scripts?

Proper code indentation and formatting can greatly impact the readability, maintainability, and functionality of PHP scripts. It makes the code easier to understand, debug, and modify, reducing the likelihood of errors and making it easier for other developers to collaborate on the project.

<?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;
}
?>