Friday, March 11, 2011

Naming Rules for variables

*A variable name must start with a letter or an underscore "_"
*A variable name can only contain alpha-numeric characters and undersores (a-z,A-Z.0-9,and_)
*A variable name should not contain spaces.If a variable name is more han one word,i should be separated with an undescore ($my_string),or with capitalizaion ($myString)
*Operators are used to operate on values.
*PHP Operators.
*This section lists the different operators used in PHP.

Arithmetic Operators
   
Operator
Description
Example
Result
+
Addition
x=2
x+2
4
-
Subtraction
X=2
5-x
3
*
Multiplication
x=4
x*5
20
%
Modulus(division remember)
5%2
10%8
10%2
1
2
0
/
Division
15/5
5/2
3
2.5
++
Increment
X=5
x++
x=6
--
Decrement
x=5
x--
x=4

1 comment:

  1. PHP MYSql Ajax Classes, Courses, LIVE Projects, Bhubaneswar, Orissa
    MySQL has complemented it being the world’s most popular open source database. Together, these two technologies provide you with an excellent platform for building database-driven web applications.
    Website: http:www.waterflame.in/
    Email id: waterflame001@gmail.com

    ReplyDelete