PHP Boolean PHP

PHP Boolean  

PHP Boolean

PHP Boolean

These data types provide output as 0 or 1. In PHP, value of True is one and the value of False is nothing.

Syntax

  1. <?php  
  2. $foo = True; // assign the value TRUE to $foo  
  3. ?>   

Example 1

  1. <?php  
  2.     $a=true;  
  3.     echo $a;  
  4. ?>  

Output:

PHP Boolean

Download free E-book of PHP


#askProgrammers
Learn Programming for Free


Join Programmers Community on Telegram


Talk with Experienced Programmers


Just drop a message, we will solve your queries