PHP Operators

PHP Operators

Operators are used to perform operations on variables and values.

In PHP there are different type of Operators are used:
  • Arithmetic Operators
  • Increment/Decrement Operators
  • Assignment Operators
  • Comparison Operators
  • Logical Operators
  • String Operators
  • Array Operators
       'Hi there' and "Hi there"
        
Single and double quotes valid in PHP but there is difference in single quoted and double quoted strings.
Single quoted list all the character without any change, but double quote produce different sting output
        
E.g.
        <?PHP
        Echo 'This is \"a\" quoted character';
        Echo "<br/>";
        Echo "This is \"a\" quoted character";
        ?>
        Output:
        This is \"a\" quoted character
        This is "a" quoted character
  • Boolean Datatype- This datatype has only two possible values True and False.            

UNIT-304
Elementary Server Side Scripting through PHP
  1. PHP Introduction
  2. How to save PHP page
  3. PHP variables and their naming conventions
  4. PHP program to find maximum of 5 numbers
  5. PHP program to find minimum of 5 numbers
  6. PHP program to find sum of 2 numbers
  7. PHP program to find subtraction of 2 numbers