PHP Variables Scope

Variable in PHP can be declared anywhere in the script. So the scope of the variable is defined by where it can be accessed in the script.In other words, it is the context where a variable is defined and accessed. PHP has three different kinds of scopes: Local Scope Global Scope Static Scope Local Scope […]

See More

PHP Variables

Variables are names given to the location in memory, and these locations are used to store information. Creating PHP Variables The PHP variable always starts with a $ sign, followed by the variable name. Example:- <?php $name = "jack"; $age = 21; $height = 6.1; ?> After execution of this code, the variable $name holds […]

See More

Comments in PHP

PHP Comments are line embedded in the code, which is not executed by the server. Commenting on your code is a good habit if you are dealing with some big projects. Commenting helps others to understand your code easily, and it’s also helpful if you are checking your code after a long time. Think of […]

See More