Challenge 1 — Solution
Task: Create a PHP file that outputs a complete HTML page with the title
"My First Page" and a single paragraph saying "PHP is running on the
server!" — using echo for the paragraph specifically, with the rest as
plain HTML outside the PHP tags.
My First Page
PHP is running on the server!";
?>
Notes:
- The , , , , and tags are plain
HTML, passed straight through to the browser untouched.
- Only the paragraph is generated by PHP, demonstrating that PHP and HTML
can be freely mixed in the same file.
- View the page source in your browser after running this — you'll see
ordinary HTML, with no trace of the tags at all, since they
were already processed by the server before the response was sent.