Is this correct? If not what is the correct syntax
I am new to php hence trying to learn.
No that is not correct. All code is interpreted, and why are you using string literals instead of actual booleans? And not to mention, you're using an assignment operator instead of a comparison operator in your if statement.