AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

PHP operators


<< Previous Page
PHP Constants
Next Page >>
PHP If Else and Elseif

PHP operators, code examples, scripts. PHP free online.
PHP Tutorial » PHP Operators

PHP Operators are used to perform operations with variables and values.

PHP divides the operators into the following groups:

Arithmetic operators
Assignment operators
Comparison operators
Increase / decrease operators
Logical operators
Operators with strings
Array operators
Conditional operators

Example 1: Create PHP Operators:
<?php
$x =10;
$y =6;
echo $x + $y."<br />";
echo $x - $y."<br />";
echo $x * $y."<br />";
echo $x / $y."<br />";
echo $x % $y."<br />";
echo $x ** $y."<br />";
$x = 20;
$x += 100;
echo $x."<br />";
?>
<?php
$x = 50;
$y = 50;
var_dump($x >= $y); // returns true because $x is greater than or equal to $y
?>

<< Previous Page
PHP Constants
Next Page >>
PHP If Else and Elseif



PHP Operator Types - php tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


Home
PHP Introduction
PHP Install
PHP Syntax
PHP Variables
PHP Echo and Print
PHP Data Types
PHP String Function
PHP Constants
PHP Operator Types
PHP If Else and Elseif
PHP Switch
PHP While Loops
PHP Loop For Do Foreach
PHP Array
Convert Array to String
PHP Function
PHP GET and POST
PHP Date/Time Functions
PHP Login
PHP Delete Element
PHP eregi_replace()
PHP mysql_query()
PHP Errors to Display
PHP Loop For Do Foreach

PHP forms
PHP Form Example
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.