How are you all ???
I need your help...
I want to learn PHP so will you please tell me the best book to learn PHP from the beginning...
Thank you in advance.. :)
Programming PHP, 2nd Edition
Just in case you need to know who Rasmus Lerdorf is, please read here. This is the guy who created PHP. Will it make the book Good?
Yes, and NO...
Yes -- because it will teach you the proper construct in PHP.
NO -- because some of the functions introduce in the book were already been or about to be deprecated.
Will I still buy this book? Of course I will, it is on sale at the Barnes and Noble for $1.99 .. you can't go wrong for a buck and 99.
Practice and lots and lots of practice can help a lot in learning PHP
Please go through this. you can see a lot abut php from this thread.
Instead of going through any book,first it will be god if you go through php manual.
Most seasoned programmers here will probably not have bought a basic php book in the last few years, so advice may be a little sketchy. Advanced stuff, sure, but probably not the sort of book that you're after. Good publishers of hardcopy are O'Reilly, Wrox and Apress. Try to get the most recent editions as older ones, as Veedeoo states, contain deprecated code and old approaches to providing solutions. For example, PHP5 was first released in 2004, and has seen substantial development up until today. So even though an edition may boast about being PHP5, it doesn't mean that the code contained within it is bleeding edge. However, the basics should be pretty much the same.
Your 'Hello World' opener, the basic syntax, variables, constants, conditional logic, loops, string and array functions are pretty much the same. One recent development is the deprecation of mysql_* functions. So try to find one that deals with mysqli_* or PDO wrapper functions.
Once you get the basics under your belt, try to get into Object Orientated Programming as soon as possible, as becoming a procedural code ninja may actually hold you back as opposed to helping you develop maintainable code. Sounds perverse, but that's what happened to me. So after the basics, invest in a simple Introduction to OOP (preferably PHP flavoured) book.
Reading this back, it sounds as though I'm boasting about being a preocedural code ninja - no I'm not - just that the procedural approach has become so ingrained that I find OOP very challenging.
Edited by diafol