The concept of a variable is not too difficult to understand, and if you have any experience with basic algebra or advanced mathematics, you have already been introduced to variables. They work very much the same way in computer programming. A variable can be thought of as any entity that has the ability to take on different values.
Two terms you will often hear in relation to technology are
static and
dynamic. Static is anything that doesn't change. As with most rules, there are exceptions, but you can normally think of static as being something that stays consistent, either unto itself or across a population. Dynamic is anything that is likely to change, usually based on a given condition. All of your PHP code will be static, and variables, while normally dynamic, can be static in some cases.
Without variables, PHP would have very little use. Back in the 1990s, during the early days of the modern internet, most websites were static. Information had to be manually updated by the web master. This involved editing the HTML or text files that made up a web page and linking them together. It was very difficult to make massive changes to the layout or structure of your website. While tools such as SSI, or server-side includes, made some modification possible, most pages were very static and not updated as frequently as many sites are today.
Variables make it possible to include content on your website that has the ability to change without the web master having to make constant changes behind the scenes. Examples where variables can really come in handy include the ability to offer user accounts, which lets you customize content based on the person browsing the site, and the ability to develop templates that all pages of the site can use to display content in a uniform fashion.