Showing posts with label types of variables. Show all posts
Showing posts with label types of variables. Show all posts

Sunday, 13 July 2014

Global Variable

A global variable is one that can be accessed from anywhere in the programming.

Each time when you declare a global variable you must keep it separate identity from the local variable because if you declared a variable as global and at the same time declared a variable with the same name as local one you simply create a logical error, so try to keep proper identification between global and local variables.

Scope of Global Variable




Sunday, 6 July 2014

PHP Variables

In general term

" A variable is a character or symbol that represents a certain value."

Suppose

A = 5
B = 2

Here
A and B are two variables
Variable A holds value 5
Variable B holds value 2

Types of PHP Variables

 Most common types of variables are given below.
  1. Local variables
  2. Global variables
  3. Static variables
  4. Function parameters