A Simple PHP Script

Chapter 4 #76 - Martha's CIS 52

ASSIGNMENT/EXPLANATION

Writing PHP code is fairly simple: just surround the text to output to the browser with the PHP opening (<?php) and closing (?>) tags.
To print something to the browser's page, use either

NOTICE: The echo statement to be output to the browser must be inside quotation marks.
A statement is an instruction to the PHP engine, and must always end with a semi-colon (to make sure the engine quits interpreting!)

A function "is a command that performs an action, usually modified in some way by data provided for it. Data sent to a function is almost always placed in parenthese after the function name...Strings must always be enclosed in quotation marks, either single or double."

Exercise

Hello Web!

CODE

<?php
echo "<h1>Hello Web!</h1>";
?>