O'Reilly logo

Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition by Paul Hudson, Andrew Hudson, Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Operators

Now that you have data values to work with, you need some operators to use, too. You have already used + to add variables together, but many others in PHP handle arithmetic, comparison, assignment, and other operators. Operator is just a fancy word for something that performs an operation, such as addition or subtraction. However, operand might be new to you. Consider this operation:

$a = $b + c;

In this operation, = and + are operators, and $a, $b, and $c are operands. Along with +, you also already know – (subtract), * (multiply), and / (divide), but Table 42.2 provides some more.

Image

TABLE 42.2 PHP Operators

At least 10 other operators ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required