ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Good book to learn PHP?

(1/3) > >>

highend01:
Hi,

I never learned a programming language before so I need something that doesn't require any previous knowledge.

Can you recommend any books that you've used yourself (I know there are a lot of resources available on the web but I prefer a good book)?

Tia,
highend

40hz:
+1!

I'd be interested too. I've really got to start cracking the books on pHp soon. Are O'Reily's "animal cover" books still the best bet?
 :)

mahesh2k:
Most of the "Dummies" and "O'reilly" titles waste a lot of book space on things like - variables, loops, math manipulation and typical time wasting stuff which is common among all the programming languages. Many books don't teach you how to make web apps or use work with database, libs and other stuff. I suggest starting with W3schools and then think of some project and then create a blog or diary that keeps track of  your learning. This is my way of learning stuff. You'll learn php or any other language much quickly this way than from books which hardly teaches you any real world stuff. There are some php tuts and snippets on the web which makes learning easy. Earlier cut and paste or band-aid learning approach wasn't used to work but considering the speed at which gigs are arriving on freelance and other job sites, books for programming languages hardly teach you anything related to real world stuff.

Stoic Joker:
Most of the "Dummies" and "O'reilly" titles waste a lot of book space on things like - variables, loops, math manipulation and typical time wasting stuff which is common among all the programming languages. Many books don't teach you how to make web apps or use work with database, libs and other stuff. I suggest starting with W3schools and then think of some project and then create a blog or diary that keeps track of  your learning. This is my way of learning stuff. You'll learn php or any other language much quickly this way than from books which hardly teaches you any real world stuff. There are some php tuts and snippets on the web which makes learning easy. Earlier cut and paste or band-aid learning approach wasn't used to work but considering the speed at which gigs are arriving on freelance and other job sites, books for programming languages hardly teach you anything related to real world stuff. -mahesh2k (October 25, 2011, 09:22 AM)
--- End quote ---

That tactic works fine for your 2nd programming language...But not so well on the first. I picked up PHP on the fly using the baptism-by-fire method of which you speak. But I already had a C/C++ base to work from which made it much easier.

One of the smartest things my old supervisor ever said to me was: Sometimes we forget what we know. Because we're so distanced from the initial confusion that we sometimes get frustrated by people not grasping ("basic") concepts that we now take for granted.

f0dder:
There are some php tuts and snippets on the web which makes learning easy. Earlier cut and paste or band-aid learning approach wasn't used to work but considering the speed at which gigs are arriving on freelance and other job sites, books for programming languages hardly teach you anything related to real world stuff.-mahesh2k (October 25, 2011, 09:22 AM)
--- End quote ---
...and if you don't have previous PHP experience, you have no good way to separate the wheat from the chaff, and you'll end up with the crappy ad-hoc duct-tape 'programming' which has given PHP an even worse name that it deserves. It's fine that small snippets elides error handling concerns, but then people go and copy/paste stuff into production environments... *facepalm*

Can't help with a decent PHP book since I haven't read any. But a few pieces of advice I can give are:

1) if you decide to go by web tutorials, be sure you try to understand everything a piece of code does before even considering using it in production. This also means reading up on the library functions used, including user comments since that's where stuff like security implications is usually discussed.
2) never construct SQL statements with string concatenation, and be sure to always use bound parameters.
3) don't depend directly on mysql/whatever, use a database abstraction library.
4) once you understand the basics, find framework(s) instead of re-inventing the wheel. Get stuff done faster, and without making the same security mistakes that a zillion others have made before you.

Navigation

[0] Message Index

[#] Next page

Go to full version