What is PHP?
PHP (Hypertext Preprocessor) is a server-side scripting language used to create dynamic and interactive websites.
It runs on a web server and is widely used for web development.
Explanation:
<?php ... ?>→ PHP code blockecho→ used to print text or data(PHP functions not case sensitive).- Output will be Hello, World! on your web page.
- In PHP, keywords (e.g.
if,else,while,echo, etc.), classes, functions, and user-defined functions are not case-sensitive.
How to Run PHP
- Install XAMPP or WAMP server(
- 👉 W – Windows→ The operating system.
👉 A – Apache → The web server that hosts your site
👉 M – MySQL → The database system to store your data.
👉 P – PHP → The scripting language used to develop web pages)
- 👉 W – Windows→ The operating system.
- Save your file as
index.phpin thehtdocsfolder - Open your browser → type http://localhost/index.php



Leave a Reply