Any output of a PHP script becomes part of the document the
PHP preprocessor is writing.
All output must be in the form of HTML which may include embedded client-side scripts
There are three forms of producing output in a PHP script
echo,
print,
and
printf
echo "A rose by any other name <br />", "Is a rose <br />";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 strict//EN" "http://www.w3.org/TR/xhtml1/dtd/xhtml1-strict.dtd"> <!-- today.php A trivial example to illustrate a php document --> <html> <head> <title> today.php</title> </head> <body> <p> <?php print "<b>Welcome to my home document <br /><br />"; print "Today is: </b>"; print date("l, F jS"); print "<br /><br />"; ?> </p> </body> </html>
| Origins and Uses of PHP |
| Overview of PHP |
| General Syntactic Characteristics |
| Primitives, Operations, and Expressions |
| Output |
| Control Statements |
| Arrays |
| Functions |
| Pattern Matching |
| Form Handling |
| Files |
| Cookies |
| Session Tracking |