PHP is one of the most widely used server side language. PHP stands for hypertext preprocessor and it is used to develop web applications. Around 250 million websites uses PHP as a scripting language. It was developed by Rasmus Lerdorf in year 1995.
PHP can be deployed on almost every server and it is highly portable. You can mix the PHP code with plain HTML. Currently PHP supports object oriented features and it is very simple server side language to learn. PHP source code gets executed by PHP engines.
PHP has a strong community over web and new developers can get their queries solved by posting on forums.
Follow the following steps to learn php if you are a beginner –
- Learn HTML basics
You must know to use basic tags in HTML. Also make sure you learn about div, tables, images and adding links with the help of HTML tags.
If you want to build beautiful web page you need to learn CSS. CSS stands for cascading style sheet. So, for your data to appear in presentable way you must learn CSS.
How to start learning PHP
Follow the steps given below to start learning PHP in efficient manner-
- Start with a basic Hello World program. Run it yourself and try to learn basic tags in PHP.
- Learn to add HTML with PHP. This will give you more power to present your data.
- Then, start with basic data types in PHP. Learn to use integer, strings, float in PHP.
- Learn to use Arrays. PHP provides many inbuilt array functions which simplifies programming.
- Learn to create user defined functions. Divide your program into modules. For example: you must keep code of sidebar and headers in separate modules.
- Learn to connect PHP with database. You must know basic SQL queries. You can connect PHP with MYSQL database.
- Learn to use Sessions and Cookies with PHP. Session variable is stored on server while cookies are stored on client side.
- Next, learn basic OOPS concept in PHP. Try to make new classes and objects with PHP. If you wish to develop big web application then you must use principles of OOPS to enhance code reusability and to avoid duplicacy of code.
- In order to read data from other website you can learn cURL. cURL provides library for transferring data using various protocols.
- Learn to create web services using php. This can be used to provide data to other platforms like mobile.
Step By Step PHP tutorials
You can start learning PHP from kb4dev PHP tutorials. This website presents comprehensive PHP notes to get started for beginners as well as for intermediates PHP professionals. Write from the basics of PHP advance concepts like cookies, sessions, CURL are covered in detail.
The idea behind kb4dev is that each user can edit the PHP notes provided at the website. So that tutorials will remain updated and authentic forever.