What are common mistakes to avoid when using IF statements in PHP, as seen in the provided code snippet?
One common mistake to avoid when using IF statements in PHP is not using the correct comparison operator. In the provided code snippet, the use of a single equals sign (`=`) instead of a double equals sign (`==`) for comparison will result in assignment instead of comparison. To fix this issue, always use double equals sign for comparison in IF statements.
// Incorrect code snippet
$number = 5;
if($number = 5) {
echo "Number is 5";
}
// Corrected code snippet
$number = 5;
if($number == 5) {
echo "Number is 5";
}