Subscriber only lesson.
Sign up to this course to view this lesson.
A variable is what you use to store something.
When to use
Anytime you have some data to store, use a variable.
Variables in PHP start with a dollar sign: $
Variable names should be descriptive. If your variable will hold an age, name the variable $age or something like that.
Variable names can't start with a number.
Variable names contain alpha-numeric characters, and underscores.
Variable names are case sensitive.
Hints & tips
- Variables are like buckets that let you store stuff.
Lesson notes are only available for subscribers.