While loop in PHP Syntax and Example

While loop in PHP is also used for repeating statements in PHP. PHP while loop checks for the condition if the condition is true then code inside the body of the loop is get executed. while – As long conditions are true, it loops back again and again through the block of code. Syntax while … Read more

PHP Introduction Syntax and First Example

Her we will provide Introduction of PHP. PHP is short form of Hypertext Preprocessor. PHP was Created in 1994 by Rasmus Lerdorf To start with PHP one should need few things that are as follows:• basic knowledge of programming / scripting.  PHP Syntax: Save your file by naming the file of “.php” extension. PHP in … Read more

PHP Constants

It is just the name for the value. But its value cannot be change in the entire script once it is created. Generally its name starts with either letter or underscore (no other signs) Syntax:

Name: It specify the name of constant Value: It specify the value of constant Case-sensitive: It means whether the … Read more

How to Send Email using PHP mail() Function

Send Email using PHP mail() Function is one of the important feature of PHP. mail() is used to send email from one email address to another. Send email by PHP is very easy and without cost. PHP gives mail() function to send email.mail() function Syntax: Done! Output:Done! Benefits of email in web application 1. Customer … Read more

PHP File Handing

File handling is need for any web application so FILE HANDLING is an important part of PHP language. Some task to be done file needs to be processed. PHP have many function handling any kind of normal files. (Liketxt, docx, csv, jpg etc) Handle a file need to know below topics i. File create ii. … Read more

Echo and print Statements in PHP

There are two types of statements in PHP by which we can generate output, one is echo and another in print. print and echo both are used to print the data in PHP and are used frequently in the programming. 1. Echo in PHP What is an echo in PHP: echo is used to print … Read more

PHP if else, else if Statements with examples

There are few conditional statements in PHP that is been used for putting different conditions. All the statements are as follows: 1. PHP if statement It execute that code only if the situation is true otherwise not. if statement Syntax: if( condition ) { if condition is true, then execute this code; } Example: ResultPHP! … Read more

PHP Final Class

In PHP 5 a new mechanism added in OOPS which is Final Keyword. If a class declares by final keyword then the class never extended. Child class can’t be created of any Final class. It is restrict the overriding a method. Only class and function may be declared as Final but no variable or properties … Read more

PHP Data Types

PHP datatype specifies which type of data a variable can store. There are following data types of PHP: String Integer Float Boolean Array 1. PHP Strings This is sequence of characters which can be put in whether double quotes or single quotes. Example: