Orientation and First Step
PHP's Place in the Web World
What's So Great About PHP?
PHP in Action
Basic Rules of PHP Programs
PHP’s Place in the world
• Programming language used mostly for building websites
• Runs on web server and accessed through web browsers
What's So Great About PHP?
• PHP is free(As in Money)
• PHP is free(As in Speech)
• PHP is Cross-Platform
• PHP is widely used
• PHP hides its complexity
• PHP is built for web programming
PHP in Action
• PHP interpreter runs the command in between <?php ?> tags
• Pages ends with extension .php
Hello World Program
Output
HTML form for submitting data
Output
Printing form using here document
Output
Printing a form
Printing formatted numbers
Basic rules of PHP programs
• <?php is start tag
• ?> is end tag
Multiple start and end tags
Whitespace and case sensitivity
• Statement is ended by semicolon(;)
• Blank spaced between the statements are ignored by interpreter
• White spaces(enter, tab, newline) does not affect the program
execution
Spacing
Keywords and function names are case
insensitive
Comments
• // and # are used for single line comments
• /* */ is used for multi line comments
Introduction to PHP
Introduction to PHP
Introduction to PHP
Introduction to PHP

Introduction to PHP