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

snippet
<?php
$foo = True; // assign the value TRUE to $foo
?>

Example 1

snippet
<?php
	$a=true;
	echo $a;
?>

Output:

PHP Boolean
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +