What potential issues can arise when using the if statement in PHP scripts?

One potential issue that can arise when using the if statement in PHP scripts is forgetting to use double equals (==) for comparison instead of a single equals sign (=) for assignment. This mistake can lead to unintended behavior or errors in the script. To avoid this issue, always double-check your if conditions to ensure they are comparing values correctly.

// Incorrect usage of single equals sign for comparison
$number = 5;

if($number = 5) {
    echo "Number is 5";
}
```

```php
// Correct usage of double equals sign for comparison
$number = 5;

if($number == 5) {
    echo "Number is 5";
}