difference bwt variable and constants
Posted: Wed Jan 20, 2010 5:33 am
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...
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...