Constants are another useful tool in our PHP toolbag.
They are used similarly to variables, but with a key difference.
While variables can be changed throughout the course of their use, constants are permanant once they are defined.
This is okay for things that are unlikely to change. For example, my name is Chris and I doubt I will ever change that.
So I could define a constant as "Chris" by entering: define ('MYNAME', 'Chris');
My favorite basketball team is certainly never going to change. I could use a constant for that as well by entering: define ('BESTTEAM', 'Milwaukee Bucks');
Now I can display my name and favorite team by entering something like: echo 'My name is ' . MYNAME . ', and I love the ' . BESTTEAM . '.';
My name is Chris, and I love the Milwaukee Bucks.