Sunday, 15 February 2015

PHP Arithmetic Operators

The PHP arithmetic operators are used with numeric values to perform basic arithmetic operations. For Ex. Addition, Subtraction, Multiplication etc.

Operator Name Description
-$a Negation Return Negative value of a given number 
$a + $b Addition Sum of given numbers
$a - $b Subtraction Difference of $a and $b
$a * $b Multiplication Production of given numbers
$a / $b Division Quotient of $a and $b
$a % $b Modulus Remainder of $a devide by $b 
$a ** $b Exponentiation Result of raising $a to the $b'th power 

Saturday, 14 February 2015

PHP Operators

An operator is some thing that takes one or more variables or values and performs action on them to produce results.

Operators can be grouped according several things. For example, can be grouped based on the type of operation they do or by the number of values they take.

The list of operator groups in PHP are:


  • Arithmetic Operators 
  • Assignment Operators
  • Bit wise Operators
  • Comparison Operators
  • Error Control Operators
  • Execution Operators
  • Infringement / Decrementig Operators
  • Logical Operators
  • String Operators
  • Array Operators
  • Type operators
Each one of these operators will be explained in individual post.

Tuesday, 18 December 2012

PHP Basics – PHP comments

The PHP comment starts with a special character sequence and all text that appears between the start of the comment and the end will be ignored.
PHP comments main purpose is to give information about the code to the programmers who works along with you. Commenting will help other programmers to understand how your code, it will be useful to you, when you need to edit your own code.
There are two types of commenting
  • Single line comment
  • Comment Block with multiple lines

PHP Basics - PHP Tags

Every PHP scripy in your file should start with PHP Opening Tag, End end with an PHP Closing Tag,
Following are standard tags for opening and closing tags in PHP.
<?php
is standard tag for opening PHP script and
?>
is standard tag for closing PHP script.

Monday, 17 December 2012

PHP Basics - Writing First Script

In this post i am going to explain how to start writing your PHP scripts in your computer Using WAMP Server.

If you haven't install WAMP server click here to learn how to install.

To start writing scripts in PHP you need Text Editor or IDE.

There are so many Text Editiors available for windows like NotePad, NotePad++ etc.

And IDEs Like NetBeans for PHP, Eclipse for  PHP, Aptana Studios are open source softwares available for PHP.