c-- styles for logos and headline links do not modify internet, red, or black styles -->

Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!

Welcome to PHP


An Intranet Design Magazine Tutorial

By Aaron Weiss

PHP Logical Operators

Operator Name Description Example Yield
and
And True if both lefthand and righthand expressions are true.
(5>2) and (3>2)

(2>5) and (3>2)
true

false
or
Or True if either lefthand or righthand expression is true.
(5>2) or (2>7)

("h">"a") or (1<3)
true

true
xor
Exclusive Or True if either lefthand or righthand expression is true unless both are true.
("ar">"ac") xor (9>2)

(3==3) xor ("f"=="f")
true

false
!
Not Negates the expression it precedes, true if the expression is not true.
!("small"<"smell")
false

All of these operators can certainly be exhausting!

Just as eye fatigue sets in, a jolt! We're about to string together everything we've learned so far, with the magic of control statements. Things get much more exciting from here on in, for those of us excited by this sort of thing (and who admit it).

 

Control Statements >

< PHP Comparison Operators


    [print version of this page]

    Welcome to PHP
    1. Introduction
    2. Why PHP?
    3. The Very Basics
    4. PHP Structure
    5. Scalar Variables and Data
    6. Data collection: Arrays
    7. PHP Variables and Web Forms
    8. Operations and Comparisons
    9. PHP Comparison Operators
    10. PHP Logical Operators
    11. Control Statements
    12. The Function of Functions
    13. Object Orientation
    14. Fini