
James C. answered 08/11/19
PHP full stack 20 years; innovative, enjoyable teaching method
"if" is a conditional control structure. That means basically that it's part of the PHP language that determines which lines of code are executed, and in which order.
if works by evaluating what is between the parentheses right after it. So:
would print "Yes!".
What is between the curly brackets of the if control structure is then executed IF the bit between the parentheses evaluates as TRUE.
In your case, the very simplest (but sort of redundant) way of doing this would be: