I'm still learning too, just keep in mind that if you don't insert the final else it might automatically assume ... else (the rest of the code). Unless you inserted the final else and closed it off to perform no action.
If ($a==1)
{
echo "happy";
} elseif {$a==2
echo "not happy";
} else {//do noffing}
Please correct me if I'm wrong or if someone else is able to provide a better example. Dankie