Write a statement to show the joining of multiple comparisons in PHP?
Page 1 of 1
Write a statement to show the joining of multiple comparisons in PHP?
PHP allows multiple comparisons to be grouped together to determine the condition of the statement. It can be done by using the following syntax:
comparison1 and|or|xor comparison2 and|or|xor comparison3 and|or|xor.
The operators that are used with comparisons are as follows:
1. and: result in positive when both comparisons are true.
2. or: result in positive when one of the comparisons or both of the comparisons are true.
3. xor: result in positive when one of the comparisons is true but not both of the comparisons.
Example:
$resCity == “Reno” or $resState == “NV” and $name == “Sally”
Similar topics
» Write a program to show the joining of two strings in PHP?
» How to use HTTP Headers inside PHP? Write the statement through which it can be added?
» How PHP statement is different from PHP script?
» What are the ways to comment statement in C++?
» Echo vs. print statement.
» How to use HTTP Headers inside PHP? Write the statement through which it can be added?
» How PHP statement is different from PHP script?
» What are the ways to comment statement in C++?
» Echo vs. print statement.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum