Learning PHP

i found a website called sitepoint, they have books to learn anything and you go along with a project while your reading the book whick i found a lot easier to learn that way, as you seem to remember the code.
 
First thing I'd suggest is that you forget about it as "the way to make a web page" and concentrate on it being a programming language.

It has all of the normal programming structures (variables, functions, objects, program flow control) and has a lot of functions and objects already predefined (connecting to a database, handling files of various types (e.g. CSV files)...

Once you get away from the idea that the purpose of it is to create a web page, it becomes much easier to visualise how to use it to develop an application.

This. Before you can learn a specific language you need to learn some of the theory behind it - most programming languages (bar things like functional languages) use the same building blocks, the differences are mostly syntax and the API offered. Without learning these basics you will write bad code, period. It will be hard to extend and modify, it will be full of security holes and it will be a nightmare for anyone else coming into it.

I'm not going to recommend you go out and read Knuth's TAOCP, but a basic primer on control structures, different types of loops and when to use them would be beneficial. You should also really learn about Object Orientated systems too as that's the way programming for PHP is going with the glut of current frameworks.

That leads me to the final point, rather than re-inventing the wheel, use a pre-made framework (not a pre-made CMS, a framework is a library of code and a pre-defined well thought out structure for your site) as it will contain things like authentication libraries - writing these can be a good learning experience, but it can also be a nightmare trying to make it as secure as possible.

i found a website called sitepoint, they have books to learn anything and you go along with a project while your reading the book whick i found a lot easier to learn that way, as you seem to remember the code.

They also have a "fire sale" (literally, all proceeds go to support the Australian bush fire efforts) at the moment - 5 ebooks for the price of 1.
 
Last edited:
Back
Top Bottom