One can use PHP variables to store informations there are some rules for PHP variables such as
- PHP variable starts with the $ sign, and followed by name of the variable.
for example: $text
- PHP variable name much begin with a letter or the underscore character.
- PHP variable name can only contain alphabetic, numeric characters and underscore.
- Variable name should not contain spaces.
- Variable names are case sensitive.
PHP has 4 different variable scopes such as
Local variables are declared within a PHP function and can only access within that funcion.