If clause

[b]code in if-clause.php[/b]

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title>if-clause</title>
</head>
<body>
<?php
$myStr = [COLOR="red"]1[/COLOR];
$yes="yes";
$no="no";
if(myStr==[COLOR="Red"]1[/COLOR])
{echo $yes;}
else
{echo $no;}
 ?>
</body>
</html>

[b]result[/b]

no

http://dot.kr/x-test/if-clause.php shows “no.”

I think the result of the code above should show “yes,” because the value of $myStr is 1.
What’s wrong with the code above or my PHP?

you missed a $


if($myStr==1)

Ah, that’s true. Thank you.