0

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.

10
Contributors
12
Replies
72
Views
4 Years
Discussion Span
Last Post by pritaeas
Featured Replies
  • 2
    diafol 3,720   4 Years Ago

    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 … Read More

0

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.

0

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.

0

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).

Edited by broj1

2

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.

Votes + Comments
I was writing an post that was incredibly similar but saw you beat me to it ;)
0

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

0

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.

0

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 :)

0

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.

0

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.

Edited by JorgeM

0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.