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 … 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:

Result:PHP stand … 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

PHP Constructor and Destructor

If the user wants to access any member function of a class then he or she must create the object first then call the member function by this object. The constructor is a method or way which automatically called when an object the for a class. No need to call it by an object. Simply constructor is a … Read more

PHP Class and Objects

Class and objects is a programming template to write a program in a block. It is helps to developer write complex program in simple way, reuse a program in multiple applications and create a structural program. A class has two member one Variables and two Functions. A class is a program structure where developer defines … Read more