Getting Started - Become PHP Expert in 30 days.



What is PHP

PHP is a programming language, created for web development.

Who Use PHP

Facebook, Yahoo, Wikipedia, Flickr, SourceForge, Photobucket and many other large sites use PHP.

Lets Say Hello to PHP

This is your first PHP program.

Create a file

hello.php

Paste following content to that file.

PHP Code:
<?php

echo "Hello from PHP";
This is very basic PHP program. Upload it to web site (or local web server), access it with url

http://yoursite/hello.php

In this program, we use one PHP command (programmers call these commands functions) echo. echo function is used to display text. Try changing the text and see how it works.

Find

PHP Code:
echo "Hello from PHP"

Replace with

PHP Code:
echo "I am a PHP Programmer now"
or

PHP Code:
echo "I have 10 cats and 2 dogs"

Exercise

In PHP each instructions end with semicolon (;).

Remove ; from end of PHP line, upload the file to web server and see what error you get.