O'Reilly logo

Core PHP Programming: Using PHP to Build Dynamic Web Sites by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

True and False

As you remember from Chapter 2, 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 a boolean value, so any value they are given will be converted to a boolean.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required