PHP Basics

Null Variables

A Null variable is a variable that doesn’t have a value. A variable is considered Null in following scenarios: When you have created a variable but you haven’t assigned a value to it, then that variable is considered a Null variable. When creating a variable in PHP, you don’t always need to assign a value… read more »

Comparison Operators

Comparison operators are used to create conditional expressions that evaluates to either TRUE or FALSE. Equals Operator (==) == is known as the ‘equals’ operator. It checks for the equality of its two operands. If both operands are equal in their values, the expression evaluates to TRUE. If two operand values are different from each… read more »

Conditional Statements

PHP’s IF statement enables you to perform different actions based on the results of evaluating some condition. For an example think of a login feature of some website. When you enter the username and a password, the login page checks to see if the username/password combination is correct or not. If the combination is correct… read more »

Variable Data type

A variable’s data type is determined by the kind of value stored in that variable. For example, if a variable has a string value stored in it, then its data type is a STRING. If a non-decimal numeric value is stored in it, then the data type is an INTEGER. If a Boolean value is… read more »

Learn about Variables – Introduction

Before reading through this lesson, open your text editor (Sublime, Notepad++ or whatever you prefer), create a new file and save it as variables.php in your web server’s document root directory. On a typical XAMPP stack your document root should be located at c:/xampp/htdocs. In my case I have saved it in c:/xampp/htdocs/tests sub-directory. When… read more »

What data we can store in a variable?

You can store a string such as a person’s name. i.e ‘Barack Obama’ You can store negative or positive numbers. i.e 2017 You can store decimal values such as a product price, etc. i.e 9.99 You are not limited to storing only strings and numbers. Expressions, Boolean values, Arrays, Objects, and Resources are also stored… read more »


Do NOT follow this link or you will be banned from the site!