While running my code on localhost I had a problem with the include command.
Here's my code:
<?php
$res = 2; // this also can be change to any number. it is based on user input, but for simply the problem i make it to be set manually
If ($res =1,){
$open = include ("weekend.php");
}
else{
$open = include ("weekday.php");
}
echo $open;
?>
I expected the output to be weekday.php, but the output is weekend.php.
It works fine if I use $res = 1.