PHP string comparison with no quotes
Posted
by tronman
on Stack Overflow
See other posts from Stack Overflow
or by tronman
Published on 2010-05-04T18:16:53Z
Indexed on
2010/05/04
18:18 UTC
Read the original article
Hit count: 123
From what I know about PHP, the following syntax is not legal:
if ($s == Yes)
It should instead be written as:
if ($s == 'Yes')
However, the first example is working just fine. Anyone know why?
© Stack Overflow or respective owner