O'Reilly logo

PHP Quick Scripting Reference by Mikael Olsson

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

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 ... ?> ...

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