Easiest way to learn PHP

What is the best tutorial, and/or easiest method of learning php?

Does a programmer really need to write php from scratch or simply utilize Google and php.net for example, to copy and paste code?

My opinion cut and paste code is a terrible way to learn PHP or any other language for the matter. Finding a current tutorial or a book that is relatively new on PHP is the way to go. Some online tutorials are even FREE. Things to look for is that they cover PDO (my recommendation) or mysqli and are using at least PHP 5.6. Preferably they are using PHP 7.

5 Likes

yes, that is the only way you learn to understand a language. (then you can even do stuff mentioned in no documentation just by looking at the code).

4 Likes

Another thing to learn is Linux. It sounds way off to even learn Linux, but I honestly don’t think it is. Linux and PHP both have similar commands. If you are installing PHP on your own, I’d recommend not installing XAMPP or WAMP or MAMP or anything that is a one-button click solution. If you install it yourself, you’ll get the feel of things and know what extensions are needed and what aren’t. I have created a tutorial on how to install PHP on both Windows 10 and Ubuntu. You can follow along with the tutorial and install PHP yourself and get it up and running in no time.

1 Like

I’d say, think of something you want to implement, and start writing code. You’ll get used to the language, database design and how to find good practice and sample code.

I don’t want to sound offhand, but a programmer certainly does need to know how to write php from scratch. Someone who uses Google and php.net and copy and paste code is not a programmer. Sample code is great to learn from, but almost never does exactly what someone else needs it to so will need some modification. There’s also an alarming amount of poor or old sample code out there - just look at how many PHP tutorial sites still have articles based around now-removed functions such as the old mysql functions, which people new to the language then go out and start using.

An experienced programmer in any language will probably build up a library of their own functions and routines that they can use and re-use in new projects, but that’s not the same as just copy-and-paste from search results.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.