PHP Variable Types

PHP had different data types according to the values assigned to it. Like simple string, numeric types, arrays, and objects. PHP supports the following data types: Integer String Float Boolean Array Object NULL Resource Integers Integers are whole numbers without a decimal point. <?php $x = 200; // decimal number var_dump($x); echo "<br>"; $y = […]

See More

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

What is PHP?

PHP is actually a recursive acronym it stands for “PHP: Hypertext Preprocessor”. It is a server-side scripting language that is used for web development. PHP is a very powerful language and today millions of websites on the internet are using PHP. Almost all popular CMS like WordPress, Joomla, Drupal, etc are made in a PHP […]

See More