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 put the value 1 or 0 into checkbox if we checked then 1 otherwise 0?What is the differece between $message and $$message?
How do I check if a date entered exists?
How do I define a constant in PHP?
What is the difference between the while and do while loops?
