Introduction to PHP
PHP is one of the most widely used server-side scripting language for web development. Popular websites like Facebook, Yahoo, Wikipedia, Slack, MailChimp, WordPress, etc., are developed using PHP.
PHP is so popular because it’s very simple to learn, code, and deploy on the server, hence it has been the first choice for beginners for decades.
In this course, we will be covering all the important concepts of PHP language from basics to advanced and will also share some ready-to-use, useful code snippets for beginners to kick-start their web development project.
What is PHP?
PHP is a server-side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.
PHP stands for Hypertext Pre-Processor. PHP is a scripting language used to develop static and dynamic web pages and web applications. Here are a few important things you must know about PHP:
- PHP is open-source and free.
- To run and execute PHP code, we need a Web server on which PHP must be installed. i.e XAMPP or WAMP (Window Apache MySQL PHP).
- PHP is a server-side scripting language, which means that PHP is executed on the server and the result is sent to the browser in plain HTML.
- PHP is open-source and free to use for development.
Is PHP the right language?
If you are still confused about whether you should learn PHP or is PHP the right language for your web project, then here we have listed down some of the features and use cases of PHP language, which will help you understand how simple yet powerful PHP scripting language is and why you should learn it.
- PHP is open-source and free, hence you can freely download, install, and start developing using it.
- PHP has a very simple and easy-to-understand syntax, hence the learning curve is smaller as compared to other scripting languages like JSP, ASP, etc.
- PHP is cross-platform, hence you can easily develop and move/deploy your PHP code/project to almost all the major operating systems like Windows, Linux, Mac OSX, etc.
- All the popular web hosting services support PHP. Also, the web hosting plans for PHP are generally amongst the cheapest plans because of their popularity.
- Popular Content Management Systems like WordPress, Joomla, Drupal, etc are developed in PHP and if you want to develop your own website you can easily do that with PHP.
- With PHP, you can create static and dynamic webpages, perform file handling operations, send emails, access and modify browser cookies, and almost everything else that you might want to implement in your web project.
- PHP is fast as compared to other scripting languages like JSP and ASP.
- PHP has in-built support for MySQL, which is one of the most widely used Database management systems.
Introduction to PHP
- Evaluation of Php
- Basic Syntax
- Defining variable and constant
- Php Data type
- Operator and Expression
Handling Html Form With PHP
- Capturing Form Data
- Dealing with Multi-value field
- Generating File uploaded form
- Redirecting a form after submission
Decisions and loop
- Making Decisions
- Doing a repetitive task with looping
- Mixing Decisions and looping with Html
- What is a function?
- Define a function
- Call by value and Call by reference
- Recursive function
- Creating and accessing String
- Searching & Replacing String
- Formatting Strings
- String Related Library function
- Anatomy of an Array
- Creating index based and Associative array
- Accessing array Element
- Looping with Index based arrays
- Looping with associative array using each () and foreach ()
- Some useful Library function
Working with file and Directories
- Understanding file& directory
- Opening and closing a file
- Copying, renaming, and deleting a file
- Working with directories
- Building a text editor
- File Uploading & Downloading
Mini Project (With file Handling)
- Using the query string (URL rewriting)
- Using the Hidden field
- Using cookies
- Using session
String matching with regular expression
- What is a regular expression?
- Pattern matching in PHP
- Replacing text
- Splitting a string with a Regular Expression
Generating Images with PHP
- Basics of computer Graphics
- Creating Image
- Manipulating Image
- Using text in Image
Database Connectivity with MySQL
- Introduction to RDBMS
- Connection with MySQL Database
- Performing basic database operation (DML) (Insert, Delete, Update, Select)
- Setting the query parameter
- Executing query
- Join (Cross joins, Inner joins, Outer Joins, Self joins.)