PHP Tutorial
- PHP Tutorial
- Install PHP
- PHP Code
- PHP Echo and print
- PHP Variable
- PHP Variable Scope
- PHP $ and $$
- PHP Constants
- PHP Data Types
- PHP Operators
- PHP Comments
Control Statement
- PHP If else
- PHP Switch
- PHP For Loop
- PHP foreach loop
- PHP While Loop
- PHP Do While Loop
- PHP Break
- PHP Continue
PHP Functions
- PHP Functions
- Parameterized Function
- PHP Call By Value and reference
- PHP Default Arguments
- PHP Variable Arguments
- PHP Recursive Function
PHP Arrays
PHP Strings
PHP Math
PHP Form
PHP Include
State Management
PHP File
Upload Download
PHP OOPs Concepts
- OOPs Concepts
- OOPs Abstract Class
- OOPs Abstraction
- OOPs Access Specifiers
- OOPs Const Keyword
- OOPs Constructor and destructor
- Encapsulation
- Final Keyword
- OOPs Functions
- OOPs Inheritance
- OOPs Interface
- OOPs Overloading
- OOPs Type Hinting
PHP MySQLi
- MySQLi CONNECT
- MySQLi CREATE DB
- MySQLi CREATE Table
- MySQLi INSERT
- MySQLi UPDATE
- MySQLi DELETE
- MySQLi SELECT
- MySQLi Order by
PHP Topics
- Compound Types
- is_null() Function
- Special Types
- Inheritance Task
- Special Types
- MVC Architecture
- PHP vs. JavaScript
- PHP vs. HTML
- PHP vs. Node.js
- PHP vs Python
- PHP PDO
- Top 10 PHP frameworks
- phpMyAdmin
- Count All Array Elements
- Create Newline
- Get Current Page URL
PHP Mail
What is PHP?
PHP stands for Hypertext Preprocessor, which is an open source scripting language. It is a server-side scripting language and a powerful tool for creating a dynamic and interactive website.
PHP is an interpreted language, so it doesn’t need compilation. It is specially designed for server-side scripting, which executes on the server. PHP can be easily embedded with HTML files.
Note: PHP is mainly used to develop server-side applications.
It has several advantages that are given below:
- We can execute PHP code on different platform such as Windows, Linux, UNIX, Solaris, etc.
- It is easy to use and learn.
- PHP provides a built-in module which helps it to connect with the database easily.
- PHP is an open source language that means it is available for free of cost.
In general, PHP is cheap, cross-platform, fast, and reliable to develop web applications.
What is HTML?
HTML stands for Hypertext Markup Language, which is used to create web pages. It is basically used to create static web pages, but it can integrate with CSS, JavaScript, and PHP.
HTML is not a programming language, as it is a tag-based language. Angular brackets <> are used to represents HTML elements or tags.
- HTML is very easy to learn and implement.
- It is not a case-sensitive language.
- We can write HTML code on any text editor like Notepad, Notepad++, Edit plus, etc.
- HTML is platform-independent, hence, it can be executed on different platform.
- It allows the programmer to add colors, audio, video, and images on a web page.
Difference between PHP and HTML
PHP | HTML |
---|---|
PHP is a server-side programming language. | HTML is a client-side scripting language. |
PHP is used in backend development, which interacts with databases to retrieve, store, and modify the information. | HTML is used in frontend development, which organizes the content of the website. |
PHP is used to create a dynamic website. The output will depend on the browser. | HTML is used to create a static website. The output of static website remains the same on each time. |
PHP can manipulate the data. | It cannot manipulate the data. |
PHP code executes on web servers like Apache web server, IIS web server. | HTML code executes on web browsers like Chrome, Internet Explorer, etc. |
PHP is scripting language. | HTML is a markup language. |
PHP7.3 is the latest version of PHP. | HTML5.2 is the latest version of HTML. |
PHP is also easy to learn but not as simple as HTML. | HTML is easy to learn. It can easily learn in a very short time. |
PHP files save with .php extension. | HTML files save with .html extension. |