1. Engineering
  2. Computer Science
  3. following code should be very basic nothing advanced write separate...

Question: following code should be very basic nothing advanced write separate...

Question details

(Following code should be very basic, nothing advanced)

Write separate PHP scripts that include conditional statements that illustrate the following types of logical expressions:

Operator

Name

Example

Result

and

And

$variable1 and $ variable2

True if both $variable1 and $variable2 are true

or

Or

$ variable1 or $ variable2

True if either $variable1 or $variable2 is true

xor

Xor

$ variable1 xor $ variable2

True if either $variable1 or $variable2 is true, but not both

&&

And

$ variable1 && $ variable2

True if both $variable1 and $ variable2 are true

||

Or

$ variable1 || $ variable2

True if either $variable1 or $ variable2 is true

!

Not

!$ variable1

True if $variable1 is not true

Your assignment must include the following:

  • A PHP script containing conditional statements that use each operator type and desired results.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution