How do I learn to program php? I have a book but I dont think I using it correctly

This topic is 3736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I am aware that this sounds like on of the noobiest questions ever but how do I learn php using a book. Ok I’ve read through the first part where the author walks you(me) through creating a weblog(blog), and I feel like I’ve learned a little but not much. What do you consider finishing a chapter. Should I be able to reproduce the code without help or reference? Or should I just be able to answer a few specific questions without being able to piece all the facts together. The book comes with the source on the cd and I realize that I will not be able to learn at all if I don’t look at it but what do I do with it? I can look at it and upload it to a test site but then what? I’m still on the first part because I’m afraid to move on. When I was learning C++, I just read through without doing any examples and it took years of learning after those books to be able to make(start) a space shooter.

Share on other sites
Do a couple of the exercises; and when I say do, i mean code it from scratch and run it. It's fine to look for syntactic reference, but don't look for code to cut & paste

-me

Share on other sites
I have been programming for a long long time and I still look up things all the time. What you need to learn is the control structures (if, loops, ect) how to declare and use variables. In this case you need to learn how to get information from forms. Now to use built in functions (time, ect) feel free to look them up.

theTroll

The book doesn't give exercises, it only gives code and I can't compile the code separately because it all fits together as on application. For example the editentry.php page can't run without the $_Post data from the addentry.php page. So it is ok to look stuff up, just not copying and pasting, ok gotcha. Share this post Link to post Share on other sites Quote:  Original post by Evil BoogerThe book doesn't give exercises Then make some up, and do them until you feel like you understand. Share this post Link to post Share on other sites Take what the book tried to teach you, for example Post variables, and make your own 'demo' which is simpler than the one in the book. Instead of a blog, just make a simple demo which lets you type a name into a textbox on one form, then says "Hello Jim!" on a second form (a "Hello World" program essentially). Share this post Link to post Share on other sites The book will explain why you are doing things and what things do, but you shouldnt memorize it all after reading that one chapter, you will still need to look up stuff every once in a while, but the book is more of a guide. You will only memorize things more and more with time and practice. Share this post Link to post Share on other sites i think the best way to learn programming in any language is to just program (of course you will need resources to look things up or find new concepts to include). sure you will end up making tons of mistakes at first, but as you work your way through them you will eventually be fluent. Share this post Link to post Share on other sites Quote:  Original post by Evil BoogerThe book doesn't give exercises, it only gives code and I can't compile the code separately because it all fits together as on application. For example the editentry.php page can't run without the$_Post data from the addentry.php page.So it is ok to look stuff up, just not copying and pasting, ok gotcha.

It's not that difficult. I have only started C++ for like 2 months, so I know how it goes. My book (Accelerated C++) does have exercises, but still I wanted more. I tried out everything I read in the book, because I found it interesting. What I'm trying to say is; it doesn't matter if there are no exercises in your book, because you can exercise yourself. Don't you have the feeling 'I want to try this too, how would it be?' when you read something. I'll try, compile and build it until it works, and that's the way it goes. You should make up your own exercises by practicing everything you read in the book, and don't read through it like it's a strip book.

Hope you can do something with this.

Regards.

Share on other sites

This topic is 3736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Create an account

Register a new account

• Forum Statistics

• Total Topics
628645
• Total Posts
2984021

• 9
• 9
• 10
• 21
• 20