sry for my jargon....
this is just a newbie query....
define('FAVMOVIE', 'The Life of Brian');
This is treated as constant as per PHP obviously...
so my question is:
Will it work as GLOBAL variable throughout my session?
can we change the value of a constant run-time? if yes then what is the use of the constant, why not using just simple variable instead?
thanks for considering my question for your expert comments/answers...
difference bwt variable and constants
Moderator: General Moderators
Re: difference bwt variable and constants
Why don't you try 
Constants
Constants
A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script (except for magic constants, which aren't actually constants). A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.
Re: difference bwt variable and constants
The names are descriptive.. a Constant is constant, and a Variable can be variable.
Re: difference bwt variable and constants
papa wrote:Why don't you try
Constants
A constant is an identifier (name) for a simple value. As the name suggests, that value cannot change during the execution of the script (except for magic constants, which aren't actually constants). A constant is case-sensitive by default. By convention, constant identifiers are always uppercase.
thanks for making that more clear to me....
but what is the purpose of the constant?