How can the use of if() statements affect the functionality of PHP scripts?

Using if() statements in PHP scripts can affect functionality if not used correctly. If the conditions in the if() statement are not properly defined, it can lead to unexpected behavior or errors in the script. To ensure the if() statements work as intended, make sure to thoroughly test the conditions and logic within them.

// Example of using if() statement with proper conditions
$number = 10;

if($number > 5){
    echo "Number is greater than 5";
} else {
    echo "Number is not greater than 5";
}