Forum Moderators: coopster
My idea is to get a book like learn PHP in 24 hours and work thru that. This will give me basic understanding.
What I would also like to do is find a source of little projects that I could undertake to help me go away and research different possible solutions that will build my knowledge and understanding by trial and error. Would there be any sites like that?
If possible I would like people to share their learning experiences to give me some insight on how they mastered PHP, which would help me and others learn.
These thread in our library might help you out:
[webmasterworld.com...]
Good luck.
dc
However I think every book I have looked at is like trying to learn foreign langauge by reading the their tourist phrase book.
Sure you can say "Your donkey has eaten my passpost" but if it was a cow that ate it you would be stuck, and the basic underlying language and structure concepts are missing.
I find what is needed is some sort of intensive course that gives a good grounding in concepts and langauage.
I have looked everywhere for a "real" course, where you can attend and learn, but they don't exist in the real world.
So as i have been learning php I have been making exercises that mod my forum website with it. The self learning that comes from moding has helped me heaps, as well as learning from the code used in the forum.
BTW there are HEAPS of free great php mauals downloadable as ebooks and pdf to use. The written stuff is plentiful on the net.
start here
[php.net...]
then read sections I to V
you may not understand it all but finding out what titles are on those pages will be invaluable as you go forward.
you could then browse through the function sections in the documentation. Again, knowing what groups of functions there are will be helpful.
You need a project, just puttering around with tutorials is fine but the motivation of actually wanting/needing to do something will get you farther than anything else.
Make a site, hobby/family/business/personal, whatever. Having your own site and doing small jobs here and there will be great.
don't be afraid to break stuff
that's pretty much what I did about 7 years ago when I started PHP. I had a cloaking script that needed to be built, or rebuilt actually, and it was all downhill from there. ;)
I had no prior programming experience prior to learning php
Throwing yourself in at the deep end might not suit everybody, but in a similar vein to supermanjnk, it sure makes you learn quickly!
In my first PHP job I did I had never done any before, but I was keen to learn, and they weren't keen to pay much, so I had my opportunity! I ended up building a reasonably sophisticated database driven site with shopping cart which appears to still be intact to this day :)
PHP.net is your first port of call if you have problems. The user contributed notes offer some terrific help and advice. If you have issues, don`t post on forums straight away, try and figure it out yourself. If you have problems, we are only too happy to help.
I`m pretty much like supermanjnk these days, I always tell the client I can do what they want if its PHP related. I worry about the coding afterwards.
The great thing about PHP is you can see things happening straight away. Its not a hard language to learn as you don`t have to use an object oriented approach if you don`t want to. Come back to that later. Learn the basics first.
And don`t forget about security. PHP can be a seriously flawed language if not used correctly and is open to some serious exploits.
Good luck.
dc
I found PHP and MySQL Web development by luke thomson and laura welling very good, with some great tasks and examples to work through as well as all the skills required to produce dynamic sites.
The concepts that are hard to get your head around become clear as you use them in the real world, so just go for it!
My book was 'build your own database driven website using php and mysql' - Kevin Yank. Excellent book.
But as with all books, I find I just don't want to work through their tutorials and exercises, building some database of results for a little league team or suchlike when that particular application holds no relevance or interest for me.
So I pick my own project, and then work through the book applying it to that. I picked an affiliate program that had a decent datafeed, with just enough variability (categories of product) to make it interesting, but not so much that I'd get bogged down in the details of widgets vs toggles vs wiglets. Going with an affiliate program made sure I had a great stock of data to hand to build around - starting with an empty database drives me nuts and I hate looking at made-up nonsense data that I've had to throw in to fill the gaps.
Usually about a third of the way through the book my project and the book's project diverge enough that I'm not going to follow the step-by-step anymore. But by that stage I've got enough of a grounding that I can carry on and research what I want to do myself (getting the lingo down so you can conduct effective searches online is usually the biggest barrier).
I learned PHP by telling someone that I could do something that I couldn't and then learning how to do it... Probably not the best method, but it worked...I had no prior programming experience prior to learning php..
Ha! That is awesome! Because that's exactly the way I did it. My first jump into PHP was a client who wanted a search engine type of site that interacted with a database. I told him over coffee that I could do it, then ran home and worked for 3 days on my first "Hello World" script.
Each time I made something work, I was shocked and jumping for joy (Which I am still doing, if you check out some of my most recent posts)
Which brings me to my final point - this forum has probably been the single best resource for learning PHP. Whenever I get stuck, I post the problem, someone else recognizes the bug in the code and helps out. I have learned enough about PHP to consider myself extremely proficient, but there's always someone here moreso.
One step at a time
Start with a simply script, setting and printing variables of strings and numbers (adding subtracting printing numbers in strings then play around with them until you 'Understand it'
Then move deeper into arrays and query stings and so on.. but always experiment with what a tutorial gives you because the worst thing you can do is 'Accept' that it works, 'Just like magic', you need to know how it works and be able to change things and make it do something different.
Understand your code 1 line of code at a time as you go down it.
It's only after years of programming and your client is about to shoot you because of a deadline, that 'maybe', and I say this with fear, you are allowed to just accept when something you don't understand works. But then go and learn it and make sure you did it right :)
Basics Basics Basics = fundamental
the portion of the manual I mentioned has a chapter
[php.net...]
then there are
[phpsec.org...]
[shiflett.org...]
[hardened-php.net...]
then there are also a couple of good threads here
[webmasterworld.com...]
[webmasterworld.com...]
[webmasterworld.com...]
>> telling someone that I could do something that I couldn't and then learning how to do it
hehe, the cloaking script was what I was hired to do. They hired me even though I knew nothing about php, I promised I could learn it in 2 weeks or they could fire me, seems to have worked out just fine. ;)
I have been coding php for about 4 years now, at another place i used to work i was the only programmer - i have recently got a job at a larger company working with some real professionals and i have learnt so much off them in such a short space of time (and im sure i'll be learning for years to come).
Teaching yourself is good, but having someone who knows their stuff to bounce ideas off is much better.
Ally
I personally started reading one of thise books about 3 years ago and I gave in, I wish I hadn't but I did. since giving in I learnt C++, Java and VB as part of my studies at college and university. I came back to PHP and I have to say it is much easier now but I did go in at the deep end, I went straight for MySQL and skipped flat files, I originally went straight for object oriented PHP but kind of strayed back towards the procedural style I skimmed over in the book I read years ago.
I would go for the OO approach, its the way forward, the procedural works but OO will help you if you ever come to learn Java, C# or any.net language etc.
dont let the abbreviations scare you MySQL used to scare the life out of me as did CSS but now they are things I can honestly ay are the easy bits.
I reccomend this website as a place to start learning some useful stuff.
[hosting.vt.edu...]
[webmasterworld.com...]
Then I began working on it the next morning. All on internet. Bought a book along the way. 3 of them all in all. Got my Zend Certification 6 months back as well :)
Good luck PHP'ing.
[edited by: Habtom at 11:59 am (utc) on May 29, 2007]