<html>
<body>
<p> Hello. </p>
<? $d="0"; ?>
<? if($d=="1"){ echo "D equals 1";} ?>
</body>
</html>
I’ve put the above code into a file named test.php. However, when I go to sitename.com/test.php?d=1, it won’t echo anything. Is my code wrong, or is there something in the php.ini I need to change? How can I fix this?
Working code:
Edit: or, in a more readable way: