The code used for index.php is below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../styles.css">
<title>Headings in HTML</title>
</head>
<body>
<h1 class="lesson-h1">HTML: Headings</h1>
<?php
$headings = 6;
$num = 1;
for($i = 0; $i < $headings; $i++){
$line = "<h$num>Heading $num</h$num>";
echo "<hr><span>" . htmlentities($line) . "</span> <br> " . $line;
$num++;
}
include('../show_code.php');
show_code('index.php');
?>
</body>
</html>