If you start to try each function from [url]http://php.net,[/url] you'll learn a lot. Of course don't let the internet tutorials.
How did you learn....
hi,
Owning a book or two is always great.
PHP and MySQL web development is a nice one, and like the title suggests, it covers both topics.
A book is supposed to teach you the right way...
Originally posted by nunomira
A book is supposed to teach you the right way...
There is no 'right way'. All a book does is show you the way the author would tackle the problems. If you approach the code from a different direction, and build a working solution, that is not wrong.
That, in my opinion, is the fundamental problem with learning from a book.
Personally, I learnt by writing an application in my spare time using the PHP manual as a guide. I had the advantage of already knowing ASP and Perl though, so the concepts behind writing websites were nothing new. Generally I reckon the best way to learn to to write as many different things as possible in the language. And make them challenging. Anyone can build a 'website content editor' of a couple of forms and a database, try something more difficult like a webmail client.
I think that it really depends.
If you have a programming background, everything is easier.
But then again it also depends, since you could have acquired some habits which are bad from a PHP perspective.
If you're coming from assembly language, you're not much better off since you're going to have to learn new programming paradigms altogether.
On the other hand, coming from C or C++, with knowledge in HTML, would be easy.
The syntax would be similiar, though you might face hiccups with weak typing, and pointers and references, and PHP's scoping rules.
Still, you'll just need the PHP manual, and perhaps some code examples since web development is different.
The code examples could easily be found by reading the source code of Open Source projects that use PHP.
If you were like me, and took the HTML and Javascript route to PHP, it also would be quite easy.
But trying to tackle the source code of existing projects wouldnt help much.
They would simply be too complex to handle, as the code would be structured across several (or should I say many) files, unlike normal Javascript.
In such cases, a good introductory book would be the best.
From there, you could try your own mini-projects, and gain a better grasp of the PHP manual.
There is no 'right way'. All a book does is show you the way the author would tackle the problems. If you approach the code from a different direction, and build a working solution, that is not wrong.
While I do agree with that, it is also true that if you dont have any ideas on how to start, getting to know someone else's ideas can help you jumpstart the process.
Two things you have to do (almost the only things you have to do):
Read code.
Write code.
In short: practice (though that's not to say some actual talent wouldn't go astray - but talent's useless without practice while practice can lead to competence even in the absence of talent).
As suggested, moving this to a more appropriate forum (posting this in Coding is a mistake of the sort you'd make fewer of as you get better at programming: logical reasoning is an important skill).
Osmosis, I sleep with my computer under my brain, which is of course displaying these forums.
Originally posted by nunomira
PHP and MySQL web development is a nice one, and like the title suggests, it covers both topics.
I suggest this book
Originally posted by piersk
I suggest this book
Everyone at this forum should own a copy of that book eh. If I can get the 30% off price from Chapters(Don't know if they have that deal in stores or just online..) I will half to buy myself a copy.
FYI, you can also get the book at 30% off (plus buy used copies) at Amazon.com
Amazon has no local stores and I have no credit card to buy stuff online. Which is good cause I would spend to much money if I did.
I started with a book, and slight experience with HTML.
Then I discovered this forum, and folks like Weekpacket and perhaps Bunkermaster, maybe even BuzzLY, beat me into shape ... (Thanks, guys!) although there's no general agreement as to whether or not the shape I'm in is a good one, heh ...
However, the real issue, over time, has been the experience gained from simply doing as Weedpacket has suggested: programming and debugging/analysis. (I don't necessarily read a lot of other code, other than snippets in questions on these boards or books, but making things work in PHP sure makes you read a lot of your own code (in the event that you weren't paying attention when you wrote it ....)
On the subject of the "Red" book ... my local "Hastings" outlet couldn't find it when I had the book hots last month, and I ended up with Core5 (Atkinson/Suraski). What's our local favorite selling for?
It retails for $39.99, but with the 30% discount it's only $27.99.
Originally posted by BuzzLY
FYI, you can also get the book at 30% off (plus buy used copies) at Amazon.com
Eh? Used copies? Is it one of those "right: I've read it, I don't need it anymore" books?
I'm one of the seemingly few people left who started programming with Turbo Pascal 5.5... but that didn't really help me when it came to PHP. (probably mostly because that was many years ago, and I hadn't really programmed since)
The one thing you hear resounding through this site (and any site about programming) is to read the manual!!!
The PHP manual is pretty well written, and covers more functions than any one person will ever use...
But that is mostly for reference. If you already have the basics of programming (in any language) it will be a little easier to pick up.
That's simply because programming is a process of defining what needs to be done, and then figuring out step-by-step how to accomplish that goal (this really works well in life, too)
Anyway, I'm freaking rambling... my daughter kept me up all night...
Originally posted by Weedpacket
Eh? Used copies? Is it one of those "right: I've read it, I don't need it anymore" books?
Hardly. Amazon lists 14 "new and used" books. Actually, these books are all being sold by third parties (such as superbookdealsdotcom). Some of them list them as new, others as "Like New." My guess is that they get some sort of bulk discount, then sell them on Amazon at "used" prices.
Then again, I'm guessing you already knew that...
Originally posted by silent
That's simply because programming is a process of defining what needs to be done, and then figuring out step-by-step how to accomplish that goal (this really works well in life, too)
I'm basically certain that a lot of "I'm new to PHP. Can anyone tell me how to do foo?" questions are actually language-independent - the person asking doesn't really know how to go about solving it at all, not just solving it in PHP. As you suggest, programming is programming, and that is the skill that needs to be learned more than knowing what "&$foo->bar($baz)" means.
If one knows how to program, a lot of questions asked here can be determined from first principles. Once that's done, one can (eventually, with recourse to the manual for hairier bits) cast the solution in PHP terms. Certainly, it's a lot easier to write a program when you really understand what you're trying to achieve in the first place!
I believe that you are correct in this, at least to a point. When I began programming again just a couple of years ago, it took a short time for some of the training from way, way back to kick in . . . but that's what had to occur. Problem solving and flow charting are pretty timeless disciplines, regardless of the syntax.
Weedpacket, you have a new sticky assignment: Logic 101 ...
I learnt from Tutorials, php.net, programming, computer camp, and this site.
php.net is probably the only resource I've ever used to learn PHP. I find it way more accessible than other manuals - perl man pages - ugh, vb man pages - what pages?
I've read a few programming books and found them to force you down a particular path. I prefer to try things out through trial and error, I get a much better feel for the way stuff works then.