Hi Abhijit,
The PHP constant is very similar to a PHP variable in that it is used to store a value but, unlike a variable, the value cannot be changed. It is called a constant because; you guessed it, it stays constant throughout the PHP program. By using a constant you "lock in" the value which prevents you from accidentally changing it.
Example:
define("CONSTANT_NAME","VALUE");
define("state","karnataka");
echo state;
Mar 17, 2010