PHP step by step tutorials Archive

Day 1 – Introduction to PHP

PHP is server side scripting language to develop dynamic websites. PHP developed in 1995 by Rasmus Lerdorf. Early versions PHP was called Personal Home Page but

Day 2 – Some basic programs in PHP

Now let’s write and run some basic programs in PHP. Program 1: Program to print “Welcome to php” in PHP. Open notepad++ and

Day 3 – Variables

Variable: variable is name of place where computer holds the value temporarily in computer’s memory (RAM), that we can use in our program. In PHP variable is defined with “$”

Day 4: Comments and Control Structures

Comment code is a line that is not executed as a part of the program. It’s only readable by someone who is editing

Day 5: while, for and switch-case

Loop is use to do repetitive work until task has not been completed. 1) Understanding “while” Control Structure while is the simplest type of loop in PHP,

Day 6: Array and foreach loop

Array can hold more than one value at a time. It’s a organized collection of key-value pairs. By default keys of array starts with

Day 7: Form Handling and Types of errors in PHP

Form is one of the powerful features of PHP. Below is an example of HTML Form: Program 25: Form example

Day 8: Form Validations in PHP

Form validations are used to filter valid data from form. Below are the examples of form validation with regular expression. These are also called server

Day 9: Database connectivity in PHP

Database is used to store information. In PHP we are using MySql as database server. Below are the steps to use MySql server with

Day 10: Include files In PHP

This is one of the strong feature of PHP that we can include content of one PHP or HTML file into