Hi, I know html and a little javascript, mostly self taught. I was wondering what I would need to know ahead of time to start learning PHP. Is PHP dependant on knowing more javascript or databasing? Also, I was wondering if anyone can point me in the direction of a good source of training on the web? Something cheap or free would be good. Thanks in advance.

Recommended Answers

All 12 Replies

For php you must only refer php manual.Complete guidance of PHP.
As for pre-requisite for learing php,you must have understanding on HTML,database,Javascript which are used quite often.

You can learn PHP without knowing those other things. Using PHP in a project though will most of time require knowledge on your standard html, js, db. OP was correct though, the php manuel is the holy grail for information on PHP.

phpacademy if you prefer watching videos.

You will also find tutorial for mysql there. PHP comes to it's power if you dynamicaly use data from a database (and mysql is most often used).

Member Avatar

You don't need to know any JS to learn PHP. In fact you don't need to learn anything else in order to use PHP. However, as you'll probably be creating websites or applications, learning the other three (HTML, CSS, JS) will be essential. You could do without JS though if you intend on producing static pages.

For PHP, I'd buy a book - there are many out there - Wrox, Apress and O'Reilly are good publishers - have a look at Amazon or similar for pricing and reviews. As books are generally peer-reviewed and edited, you may find them more reliable than random tutorials and videos dotted around the web.

As mentioned the php.net website should serve as your main resource. THis provides up to date info about deprecated and removed functions and examples of how to use functions and constructs.

Try to move to OOP as soon as you learn the basics of the language, before you get into bad habits with duplicating procedural code all over the place. Also remember to separate your HTML and your PHP as far as possible. Frameworks such as Laravel, Yii, Codeigniter, etc. and templating engines (RainTPL, Twig, Smarty etc) may help with this.

commented: I was writing an post that was incredibly similar but saw you beat me to it ;) +5

@ diafol are there any php books that you can recommend to someone who wants to go the OOP route?

Member Avatar

Not sure I can recommend any PHP OOP books, but...

I bought a "PHP Objects, Patterns and Practice 3rd Edition" by Matt Zandstra - it is NOT very good. Far too complicated and garbled for what should be a straightforward description for intermediate php programmers.

I bought "Professional PHP5 (Programmer to Programmer)" by Ed Lecky-Thompson et al a good while ago and while I learned a bit, it was full of errors in the code examples, which made my learning a lot slower that it should have been. If memory serves me right, they also insist on using PostgreSQL instead of MySQL.

So, those are two to probably AVOID. Since then I've been looking at online tutorials and framework tutorials. However, if I come across any good books, I'll be sure to post.

I used "PHP & MySQL for dummies" and it was actually a really good book, they assume basic HTML and CSS, but nothing too advanced. It breaks it in quite nicely :)

I appreciate all the responses and I defer to your knowlege in this respect, however I am handicapped by the curse of not being able to retain what I read. I suffered a TBI injury back in 2007 in Iraq that left me with scarring on my brain which effects my short term memory mostly with what I am reading. This makes it almost impossible for me to learn by reading. I do best with video and that has to be able to be paused so I can do things step by step. I will check into phpacademy, thanks for the tip broj1.

If you were serving your country in Iraq, I want to thank you for your service and wish you all the best.

Good luck and just keep practicing.

As per the PHP concern i would like to say that you have required good knowledge of HTML,JavaScript and CSS. The basic knowledge of these three language must need to learn the PHP because PHP is based on these three languages.

Since you are starting PHP, start right.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.