Abstract: Boolean type is used to control the process. When two objects are compared, you can use "" to determine whether it is true. In addition, when using a Boolean variable for process control, you can directly use it without comparing it with the true keyword, as shown in program 2-4 .... Boolean is the simplest type. Boolean indicates True or False, which can be True or False. To specify a variable as a Boolean value, use the True or False keywords. both variables are case insensitive, as shown below:
$ Flag = TRUE; // assign TRUE to the variable $ flag
?>
Boolean type is used to control the process. When comparing two objects, you can use "=" to determine whether it is true. In addition, when using a Boolean variable for process control, you can directly use it without comparing it with the true keyword, as shown in program 2-4.
$ Action = "show_book ";
$ Show_br = true;
// Use "=" to judge
// Return a Boolean value for if condition branch judgment
If ($ action = "show_version "){
Echo "you selected to display the current version number! ";
}
// The following code is no longer needed
If ($ show_br = true ){
Echo"
\ N ";
}
// Use the simplified judgment method
If ($ show_br ){
Echo"
\ N ";
}
?>
The above is a detailed description of the Boolean variables of the PHP Data type. For more information, see PHP Chinese network (www.php1.cn )!