PHP Syntax Variables Boolean

 

- Info:

- PHP has only one type of variable, called scalar.

- This tutorial shows possible ways of loading scalar with boolean.

 

- Create:

$bool = true;

$bool = FALSE;

 

- Display:

echo ($bool); //Returns 1 for true and nothing for false.

print ($bool); //Returns 1 for true and nothing for false.

printf($bool); //Returns 1 for true and nothing for false.