views:

196

answers:

7

I tried doing tutorials but it is unorganized and unstructured, where can I learn PHP from beginner to master? I'm looking for a site like www.w3chools.com, but somehow I feel it is incomplete, specially when it comes to more advanced functions.

I know some basics but I wouldn't be able to for example make a secure online webstore, and I seem to be stuck at this point, how / where should I proceed?

A: 

I love the apress books so perhaps Beginning PHP and MySQL: From Novice to Professional, Third Edition might be for you? Do you have a development background?

Alistair
I dabble, I took design in college but it war more graphics than programming. To be honest my biggest problem is with security i think, the rest I can figure out as I go along.
Murtez
+4  A: 

Getting to 'mastery' is going to take a lot of effort, time and work. You can't become an expert by simply reading tutorials - the best way is to learn by doing. Get to grips with the basics, then play around. Once you're more comfortable, invest in some books.

If you're looking to build a complex system then you might be better using an off-the-shelf alternative. Try Googling around for various e-commerce systems (Magento is in vogue at the moment) and Content Management Systems (CMSes) before you decide to reinvent the wheel.

Geoff Adams
You should make the difference between "programming" and "developing software". You can hack around in PHP all you want, to develop larger and more complex systems, just staring at a source code editor will not work.
Konerak
Totally agree with this comment. There are plenty of coders out there who know their chosen language(s) inside out, but would not be able to build a maintainable and expandable application using it. My point is that for most purposes, you can save yourself a lot of effort and time by using a pre-existing platform and extending it if needs be.
Geoff Adams
A: 

You may want to look at picking up a book at your local book store or look at grabbing one off Amazon.com. I haven't found really good PHP web resource to learn from. Usually I just do a quick google search on topics I'm trying to code.

Another option is to just dive in and start building applications. I've found that the best way to learn PHP is to learn as you go. Once you have a grasp on the basic syntax and how to move around the code, then you can pick up a book at look at OOP topics as well look into Frameworks such as Zend, CakePHP, etc.

Ryan Gyure
+2  A: 

I started 7 years ago. In my personal experience, your road to programming will look something like this:

HTML -> CSS -> Javascript -> PHP/MySQL [Insert other web script language here] -> "Desktop Languages"

For HTML (and CSS), I started by using a graphical editor at (then freewebs.com) webs.com that allowed me to add code snippets. I used some random GeoCities site (may it rest in peace) to look up things. Now, use Google or Bing.

Then, I got Jeffrey Zeldman's book, Designing with Web Standards. I followed through the book, typing out the code in notepad. Try to understand what the code does.

Do yourself a favor, use Notepad++ or Programmer's Notepad. They support automatic tabbing for neater code. It will make you a better and more sane coder in the long run.

Another thing I used to do was look at people's code by right clicking in my browser and hitting "view source".

This only gets you the HTLM/CSS after the PHP has been run and the Javascript before it was run. Google Chrome is good for analyzing scripts because of the debugging capabilities. (Don't worry about that yet though.)

Javascript was an adventure back then. Now, we have jQuery. Start with that or a similar framework. This can be researched online. I have never bought a Javascript book. I do have an ancient one from Visual Quickstart that I used to learn what a method looks like. Beyond that, the particular book in question is an outdated rag.

To learn PHP/MySQL you can get a book. The two languages are often put together so finding books that show you how to use them in tandem should be a snap. I used O'reilly books for PHP.

I don't like the online PHP reference so much, because when I'm testing I don't always have internet. I use a virtual server setup on my machine. Look into that when you are ready to start learning PHP and MySQL.

The last thing to remember is that web standards are always changing, but don't get too crazy about it. when I started, XHTML was all the rage and now everyone is talking about HTML5. I still use XHTML as do many others. It goes to show that things move at different paces for everyone.

Good luck, I hope I helped!

EDIT: Geoff Adams pretty much sums up my post - Play around the invest in books. And, it will take time. I'm till nowhere near perfect.

Moshe
A: 

Are you absolutely set on learning PHP? If you are, then buy a good book - there's several mentioned here that are actually ok - but please, learn the security aspects from the start. There's more than enough PHP developers in the world who are writing insecure code (I used to be one of them, so I'd know).

Practice is key though; I've been programming in PHP now for about 6 years, and I'd consider myself fairly competent (I passed my Zend PHP5 Certification a couple of months back), but I still find functions I've never seen before.

A tip - don't even think of looking at Zend Framework, Magento or anything like that until you're comfortable with the basics. If you do, you'll definitely struggle; they use some advanced concepts which even I find it hard to wrap my head around at times.

Alternatively, you could learn something else...

Stephen Orr
+1  A: 

Read this book alt text

also keep going through those tutorials (XHTML, CSS, Javascript) and try out everything you learn as you learn it.

Adam
A: 

The book recommendations are great. "Mastery", though, comes only from practicing your craft. If you want to learn PHP, you need to build many sites, with PHP (and HTML, CSS, Javascript, MySQL, etc.).

To have confidence that you can build a secure online web store, well, you need to build one. Maybe you can find a company that will pay you to learn. Maybe you will find a colleague to mentor you through it. Or maybe you'll have to dig into books, multiple web sites, and some poorly written "integration guide" from a payment authorization provider. My first time through I was nervous. The second time it went a little quicker. And the third time I felt confident enough to estimate how long it would take.

I'm not trying to be difficult or flip. I just feel that "learn by doing" may be the only way to learn much of this stuff.

ndp