|
Boolean Values
A Boolean value is one that is in either of two states. They are known as True or False values,in programming. True is usually given a value of 1,and False is given a value of zero. You set them up just like other variables
$trueValue = 1; $falseValue = 0;
You can replace the 1 and 0 with the words "true" and "false" (without the quotes). But a note of caution,if you do. Try this script out,and see what happens:
<?
$true_value = true; $false_value = false;
echo "true_value = " . $true_value; echo " false_value = " . $false_value;
?>
|