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.


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

Example 1

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


PHP Boolean

Download free E-book of PHP

Learn Programming for Free

Join Programmers Community on Telegram

Talk with Experienced Programmers

Just drop a message, we will solve your queries