Learning PHP: The DIY Way

Setting Up A PHP Environment
Before you start learning PHP you will need the proper environment: a web server and a PHP interpreter are the minimum requirements. A database will also be necessary to store records and data to be accessed by the PHP scripts. The most common setup is an Apache web server and MySQL database.

There are two options at this point: sign-up for free web hosting that is PHP enabled, or setup a web server on your own machine. Packages are available depending on your operating system LAMP (Linux), WAMP (Windows), MAMP (OS X), XAMPP (cross-platform), or you can install each piece separately.

There are also many options for an editor, which range from basic text editors and online syntax checking editors to full blown IDEs with syntax highlighting and debugging options.

Learning The Syntax
The best way to learn any programming language is to dive in and start practicing. If you do not have any experience with programming, the best way to learn the basics is to find a tutorial or book with example code. There are many resources available including the O’Reilly book series and many free online tutorials like w3schools.

On the other hand, if you are already familiar with programming and have a specific project in mind, then you may be able to use the php.net website to look up specific functions, read up on the documentation, or sign up for a user group where you can ask questions.