Thursday, February 3, 2011

Variables in PHP

In my early post I said PHP is the most popular open source web development technology. So I hope to write more posts about PHP. So let’s start with Variables.
If you want to be a good programmer, you should have a good understand about Variables. So let’s see what is this variable?
                     Variable is a symbolic representation of a value.

In PHP, Variable names:
  •      Should start with $ (Dollar) sign 
  •      Followed by names or underscore
  •    Can contain numbers or names or dashes
  •     No space between $ sign and name 
  •     Case sensitive
So let’s make more sense in this example:

In web browser :


  1. why do we need Variables?

  2. Without variable you can assign values, even you can program without variables

  3. Very well explained..variable are the integral part of any language.These are the basic entities forming the core of the code.