Constants in PHP In PHP, constants are identifiers (names) that represent a simple, fixed value, They are similar to variables, but once defined, they cannot be changed or redefined. Constants are useful for defining values that you want to remain consistent throughout your code .
To define a constant To define a constant, you use the define() function. Here’s the general syntax: define("NAME_OF _THE _CONSTANT",VALUE); “NAME_OF_THE_CONSTANT” is the name of the constant you want to define. Value is the value assigned to the constant.
For Example : Once defined, you can use constants throughout your script, and their value remains the same .