You are here: Daniel Dumas » Blog, PHP »

PHP Operators

PHP Operators

PHP Operators are very important, if PHP variables is the building blocks of PHP programming PHP Operators is the tool that lets you do something useful with variables. php comes with many useful operators such as Assignment Operator, Arithmetic Operator, String Operator, Comparison Operator and Logical Operator.

Below is a list of PHP Operators and its function

PHP OPERATORS
= Assignment
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus
. String Concatenation
== is equal to
=== is equal to and of the same type
<> or != Not equal to
<
Less than
> Greater Than
<= Less than or Equal to
>= Greater than or Equal to
&& Logical AND
|| Logical OR
xor Logical XOR
! Logical NOT
++ Increment or Addition by 1
Decrement or Subtraction by 1

Discussion

  1. uardani says:

    Gee….perhaps I got to start learning about it.

    I’m totally blind about PHP :B

    uardani’s last blog post..Buxilliard Suspended

  2. Decrement by one uses two “-”

    So like incrementation it should use proper char doubled – this case it’s “–”

  3. I’m learning php from an institute….just started with the basics….anyways thanks for shairing helpful information dear.

  4. I have no knowledge about php, but want to learn this programming language. Keep updating with some tutorials. I’ll be very thankful to u.

  5. I strongly recommend that you turn the No Follow off in your comment section. I’ll watch Google Webmaster Tools, and if the links don’t show up after a couple of weeks — I won’t go back to that blog again. Another suggestion: you should have a Top Commentator widget installed. Do Follow and Top Commentator will ensure that you have a successful blog with lots of readers!

  6. Deena says:

    hi, I didn’t know where to contact you but your web design looked off on opera and internet explorer. Anyways, i just suscribd to your rss.

Leave a Reply





Spam protection by WP Captcha-Free