types of operators in php

It is for static page, dynamic page, website, SEO, performance and other web development discussion
Joshi jahanvi

types of operators in php

Postby Joshi jahanvi » Tue Sep 16, 2014 5:44 pm

Explain Boolean, Arithmetic, Relational and ternary Operators


sonall gajera

Re: types of operators in php

Postby sonall gajera » Sat Jul 11, 2015 11:47 am

[1] Boolean Operators: Boolean Operators are used to connect and define the relationship between your search terms. When searching electronic databases, you can use Boolean operators to either narrow or broaden your record sets. The three Boolean operators are AND, OR and NOT.

[2] Arithmetic Operators: The PHP arithmetic operators are used with numeric values to perform common arithmetical operations, such as addition, subtraction, multiplication etc.+,-,*,/,%.** are arithmetic operators.

[3] Relational Operators: Relational operators are used to compare values. These operators always result in boolean value.>,>=,<,<=,==,!== or <>,===,!== are relational operators.

[4] Ternary Operator: It is called the ternary operator because it takes three operands - a condition, a result for true, and a result for false. If that sounds like an if statement to you, you are right on the money - the ternary operator is a shorthand way of doing if statements.


Return to “PHP, HTML, MYSQL and Web Hosting”

Who is online

Users browsing this forum: No registered users and 3 guests