Introduction to PHP for Os X by Example

Hello PHP!

  • Open Xcode 2.0 (/developer/applications/Xcode.app).
  • Open a New Empty File (^zN).
  • Type the following exactly as it appears.

<?php $title = 'Hello X World III'; ?> <html> <head> <title><?php print $title ?></title> </head> <body> <h1><?php print $title ?></h1> <?php phpinfo(); ?> </body> </html>

Note: You can turn on syntax colouring for PHP from the Format menu in Xcode 2.0 (Format -> Syntax Coloring -> PHP)