Running PHP code

Create a file index.php containing the following code.
<!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title> CSE104 </title>
</head>

<body>

<?php 
$a = "Hello";
print "This text is written by PHP! $a";
?>

</body>

</html>
To run this code, we need a server with PHP interpretor. If you upload this file on your online directory on cse104.org server, it will work, but this process is not convenient for local development.
The simplest solution to run PHP is to use Xampp. Follow these steps to prepare your machine:
assets/xampp.jpg
A detailed video tutorial is available here:
You should now see the result of the PHP interpretation.
A few notes:
Alternative to xampp: Another possibility in Linux/Mac is to install the command line tool PHP (ex. sudo apt install php on Ubuntu) in case you don't want/cannot use xampp. A detailed video tutorial is available here: