What is a constant in PHP?
It is a specific data type and it retains the value you give it initially through your whole script.
Obviously this is very different to a variable whose value can, and often does, vary throughout the script.
To see how to create a constant, view the question on how to define a constant in PHP.
Note that you may routinely access constants in your use of PHP but not realise it, e.g. PHP_VERSION tells you the version of PHP running.
Comment on this Question and Answer >>>
ASK A QUESTION
More other PHP Questions
How can I stop my PHP script timing out?Can PHP create PDF files for me?
What is the difference between the while and do while loops?
What does the @ character do in PHP?
What is the difference between sessions and cookies?
