Hi, community !!
Can somebody make me understand what is the difference between the CONSTANT and the GLOBAL VARIABLE ??
A CONSTANT is exactly what it says, an unchanging value. Use this for something that you never want to change in the course of a script, like a path to some external files, or boilerplate text. See http://www.php.net/manual/en/language.constants.php .
A GLOBAL VARIABLE is also exactly what it says, a value that is set by the system, so that it may change in various circumstances, like the name of the script inside which it is being used, or a value entered into a form by a user. Because it has been set by the system, it is (unlike ordinary variables) available everywhere in your script (for example, both outside and inside functions, where external variables are normally not available). See http://www.php.net/manual/en/reserved.variables.php .
It is however possible to make an external variable available inside a function, by using the keyword global. See http://www.php.net/manual/en/language.variables.scope.php .
" Three days without programming and life becomes boring "
Shadab .I. Wadiwala
My homepage:-- http://shadabworld.110mb.com
Download prohibited? No problem. CHAT from any browser, without download.
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php
New York PHP
http://www.nyphp.com/training - In-depth PHP Training Courses
_______________________________________________ New York PHP Community Talk Mailing List http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online http://www.nyphpcon.com Show Your Participation in New York PHP http://www.nyphp.org/show_participation.php