I have a few lines of code
$case=0;
file_put_contents("text.txt", $case, FILE_APPEND);
if ($case = 1)
{
$message['a']="co";
}
if ($case = 0)
{
$message['a']="to";
}
echo $message['a'];
It will echo "co". Why is this? The file_put contents puts "0". However the if statement thinks it is 1 for some reason...