CHAPTER 1

image

Using PHP

To start developing in PHP, create a plain text file with a .php file extension and open it in the editor of your choice – for example Notepad, JEdit, Dreamweaver, Netbeans or PHPEclipse. This PHP file can include any HTML, as well as PHP scripting code. Begin by first entering the following standard HTML elements into the document.

<html> <head><title>PHP Test</title></head> <body></body></html>

Embedding PHP

PHP code can be embedded anywhere in a web document in one of four different ways. The standard notation is to delimit the code by “<?php” and “?>”. This is called a PHP code block, or just a PHP block.

<?php ... ?> ...

Get PHP Quick Scripting Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.