What potential issue is the user facing when trying to compare values in PHP using the "=" operator instead of "==" or "==="?

When trying to compare values in PHP using the "=" operator instead of "==" or "===", the user may inadvertently assign a value to a variable instead of comparing it. This can lead to unexpected behavior in the code and logical errors. To fix this issue, the user should use "==" for loose comparison and "===" for strict comparison to properly compare values without assigning them.

// Incorrect comparison using "=" operator
$number = 5;
if($number = 10) {
    echo "Number is 10";
} else {
    echo "Number is not 10";
}

// Correct comparison using "==" operator
$number = 5;
if($number == 10) {
    echo "Number is 10";
} else {
    echo "Number is not 10";
}