I want to check a variable to see if it's a zero and if it is change it to a 1. But there must be something wrong with my code because it isn't changing the value.
$id = 0;
if ($id = 0) {
$id = 1;
}
echo $id;
Can someone help me figure out what I'm doing wrong?