True and False PHP

PHP has the concepts of true and false. Zero and an empty string are considered to be false. Any other numerical value or string is true. These concepts were discussed in regard to relational operators, but they are also used in control statements. Control statements like if expect aBoolean value, so any value they are given will be converted to a boolean.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

PHP Topics