Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php check if variable is true or false

Testing $var == true is the same than just testing $var.

You can read this SO question on comparison operator. You can also read PHP manual on this topic.

Note: a variable does not return true. It is true, or it evaluates to true. However, a function returns true.
 
PREVIOUS NEXT
Tagged: #php #check #variable #true #false
ADD COMMENT
Topic
Name
5+8 =