PHP (Hypertext Preprocessor) is a programming language that is especially used for web development and can be embedded into HTML.
Simply create your .php files, place them in your web directory and the server will analyze them automatically.
It is not necessary to compile anything or install additional tools. Think of these PHP-enabled files as simple HTML files with a completely new family of magic tags that allow you to do all kinds of things.
Let's install some softwares to get ready to run .php files.
if you don't want to download separately PHP, apache & Mysql we have the option to download XAMPP it contains all three and doesn't need to download anything.
After installation of XAMPP, your software looks like the below screenshot
Let's start apache and MySQL to run our PHP files from xampp control panel then we have to create .php file into C:\xampp\htdocs\ suppose we have created example.php now we need to write our PHP code into it, see the example below.
<?php echo '<p>Hello World</p>'; ?>
let's open a web browser and type http://localhost/example.php you will see "Hello World" on our screen.
Loading, please wait...