How to start with PHP

This is a quick guide to help you write your first PHP code.

< ?php echo "My first PHP code"; ?>

PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.- php.net

Knowledge:
You need some basic knowledge of HTML and CSS. PHP outputs results to the browser…in HTML / CSS format…

Software:

  1. PHP needs a web server that has PHP installed, or use install a free Wamp server on your machine. My favorite is UwAmp
  2. Programmer’s Notepad (It numbers your code. You can see the line number with an error for example)
  3. Notepad

How to install a Wampserver on your machine

Go to uwamp.com and download and install the software. The beauty with UwAmp is that you can run it in any drive on your machine or on a flash disk / USB stick.

Once you install, click on the UwAmp icon. You should have the below user interface.

UwAmp Server

Click on www folder and inside it, create your first PHP project folder. You can name the folder PHP.

Write your first line of PHP code
Install Programmer’s Notepad, and launch it. Type in the below text.


first PHP code

Go to File and Save As…and look for the PHP folder that you created.

Write index. Your first index.php file.

Now you can go to your browser and type localhost/PHP/ in the browser address.

PHP code is live

That above is your first PHP code … live!

Some PHP resources online:
> PHP official site 
> PHP the right way 
> PHP Course at Code Academy 
> Job Tensor – Introduction to PHP

Advanced database manipulation using PHP
> PHP Delusions

Questions and answers

Google or go to Stack Overflow.