How important is it to properly format and structure PHP code for readability and maintainability?

Properly formatting and structuring PHP code is crucial for readability and maintainability. It makes the code easier to understand for developers, reduces the chances of errors, and allows for easier debugging and modification in the future.

<?php

// Badly formatted code
$variable=5;for($i=0;$i<$variable;$i++){$result=$i*2;echo $result;}

// Properly formatted code
$variable = 5;
for ($i = 0; $i < $variable; $i++) {
    $result = $i * 2;
    echo $result;
}

?>