O'Reilly logo

Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ by Dan Scott, George Baklarz, Paul C. Zikopoulos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning the PHP Language

Delimiting PHP Code

PHP was developed as an HTML template language, with the intention of making it easy to intersperse snippets of executable PHP code amongst sections of static HTML output. For this reason, any section of PHP code starts with the processing instruction (PI) <?php and ends with the closing delimiter ?>. So, for example, a PHP page that prints the current date could consist of the following code:

<html>
<head><title>Today's date</title></head>
<body>
<p>Today's date is:
<?php echo date('Y-m-d'); ?>
</p>
</body></html>

The PHP interpreter loads the page, automatically returns all of the HTML leading up to the PHP code <?php echo date('Y-m-d'); ?>, interprets and returns the results of the PHP code, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required