tags:

views:

125

answers:

5
+2  Q: 

How to learn PHP

I'm relatively new to PHP, and am trying to learn.

How long did it take you from the point of zero php knowledge to a level of competence where you could actually construct your own, functional website?

From what point should I begin, if have no programming background?

Thanks in advance to anyone who participates in this discussion.

+2  A: 

Your question is highly subjective and likely to be closed, so I'll get in before that happens and advise you to check out here http://stackoverflow.com/questions/90924/what-is-the-best-php-programming-book to answer your question about what resources to use, also here: http://stackoverflow.com/questions/102669/good-place-to-start-learning-php

Evernoob
A: 

I'd just think of a project to do, bookmark php.net, and start from there. NO better teacher then actually doing code.

canadiancreed
+3  A: 

Everyone learns differently, so what works for me might not work for you. Also, everyone learns at a different pace, so no one here can estimate how long it will take for you to become competent at PHP programming.

However, if you need resources to learn, you should start with the very basic tutorial on the PHP site. It appears that Good PHP Tutorials has an index of tutorials for different purposes, so some of they might help you out. If you have questions, be sure to search around Stack Overflow or ask them if they aren't asked already. And having access to the documentation is always a good thing.

Thomas Owens
+1  A: 

How long did it take you from the point of zero php knowledge to a level of competence where you could actually construct your own, functional website?

You can build a full functional site without PHP or any other server-side language. PHP is only an enhancement: web sites are built with HTML and CSS and that's what you should be learning first. Once you're proficient enough with them, you can start adding some bits of PHP in order to accomplish specific tasks, like share common navigation blocks or handling a contact form.

From what point should I begin, if have no programming background?

Basically, you should cover two areas

  • Learn web static languages (HTML and CSS) and learn them properly: validate your code with online validators.
  • Get some basic programming skills: before injecting PHP into your HTML, you need to make sure you can use PHP for classical programming tasks: calculating factorials or Fibonacci series, reversing strings byte per byte, etc.

What resources can we use to help?

I'll tell you the opposite: try to avoid poorly written and outdated PHP tutorials (they're tons of them outhere).

Do you think learning on your own is as effective as taking instruction?

It depends. If you're good at teaching yourself, taking classes will lead you to an extreme boredom :)

Álvaro G. Vicario
+1  A: 

From my experience learning PHP isn't hard. I've learned it in a week. But I had a strong C programming base.
If you need to learn it from the beginning, well, it might be harder. You need to know at least a base of HTML (or XHTML) and of basic, not the language, Programming (An, eventually, a basic knowledge of SQL). Obviously every good modern website will also need CSS for page formatting and some AJAX (by using a framework such as jQuery) to do some neat "Web 2.0" stuff.

I know this is a collection of C tutorials to start, but I think it would give you an idea on how to program: Basic C Programming Tutorials. I'd also buy a book like Learn to Program by Pragmatic Bookshelf. Or, if you like to try something different to learn programming itself and a "peculiar" programming language, I'd go for why's (poignant) guide to ruby. It's great and it starts from the beginning. I would also take a look at this reply on StackOverflow: it contains lots of free eBook and guides to a lot of programming languages (There are also two for PHP) and to programming itself. A great resource, IMHO.
However you might find useful the Official PHP Manual. I've used this to start working on PHP and I think it's the best if you use it. It has every update to the language and lots of example for each functionality of the language.

I don't know if learning by yourself would be effective as learning from taking instructions. In my experience learning by your own takes you as high as write simple programs. But then, when you want to do more difficult stuff, you have to try to write your application (Or web site, all right) and then go around the web and ask for help (Here might be a good place).

All right, now get yourself a copy of XAMPP and get to work!

Jazzinghen