PHP for and foreach loop statement

It is used when one knows how many time one need to run the particular loop. It is also of two types: 1. PHP for loop statement Loop back again and again through specified time duration. Read More PHP while loop PHP do while loop PHP for loop syntax: for (initialization; condition check; increment/ decrement … Read more

Polymorphism in PHP with Example

Polymorphism in PHP is one of the important concepts in OOPs. Polymorphism is a Greek word. Polymorphism is created by two different words poly (means many) and morph (means forms). It is another functionality of OOPS. In a programming language, two types of Polymorphism are there. Function overriding (Run time Polymorphism) Function Overloading(Compile time Polymorphism) … Read more

PHP String

String means set of characters or letters or combination in single or double quotes. Like ‘PHP Language’. If you placed the number in the single quote or double quotes it’s also a string. Like ‘12345’. Similarly, special characters symbol whatever if you write it in the single or double quote it’s become a string. In … Read more

String functions in PHP- uses and examples

Now list some String functions in PHP to handle and manipulate string in PHP. All functions explained are inbuilt PHP functions also known as predefined string functions in PHP. These functions are defined during creation of PHP. sterlen() Length of String sterlen() function is used to get the entire length of the string. If there … Read more

PHP File Upload Example

PHP File Upload is a very important topic in PHP. Build any kind of websites or web application there has must be files. So want know that how can upload files or retrieve those files and download it (if required). You should have basic knowledge of Form Handling in PHP for working uploading a file. … Read more

PHP Operators

Operators are used to perform some actions on variables and values. There are 7 types of operators. 1.PHP Arithmetic Operators This operator is used with numerical values so that one can get value of a particular value. Arithmetic operators are +, – , * , / , % , **(power) Syntax:Addition- $a + $bSubtraction- $a … Read more

PHP Variables-Declare Initialize Local, Global, Static Variables

Variables are those which is used to store the information. They act like a container. It start with ‘$’ this sign and follow by name of the variable. Variable name should either start with Underscore or some letter but I can never start with a number. Example: Result: 5  Price is 66.5 My Name is … Read more

PHP Single line and multiline Comments

By comment it means that the developers do not want to execute that particular code. It is generally to test that this particular code is running properly or not. Single line comment:  // Multiline comment: /* …..                          …  */ Example: /*Multiple Line Comment … Read more

PHP Abstract Class

Abstract keyword is another new functionality in OOPS. When a class declare by Abstract keyword this class cannot be instantiate. Means if user declares a class as an Abstract class he or she cannot create object of that class. Abstract class is only use for inheriting another class. Main purpose of creating abstract class is … Read more

PHP Inheritance

Inheritance is a wonderful feature of OOPS. It is solved the duplication of code. Code duplication happened when user uses same code multiple times. Using Inheritance declare the logic in one class and extends it whenever needs to use it. And also add new functionality with old one. In Inheritance, there have parent or base … Read more