1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Learning PHP, I'm stuck

Discussion in 'Off Topic' started by Lucas, Mar 3, 2013.

  1. Lucas

    Lucas Well-Known Member

    I've been for years trying to focus my mind on learning PHP in-depth and haven't been able to grasp it. For years I've started learning a couple of books and wasn't able to finish them, although I understand most of the basics such as fors, whiles, switch, functions, methods, etc. I can't understand the idea of building the program from 0.

    I'm thinking of retaking some books and reading them slowly and in-depth and hopefully grab an idea from there. Any other recommendations? I think I'm ultimately lacking is some motivation, I'm one of those people that love going right to the practice although that's not always the best. I'm worked for several years on linux, apache, servers, etc. but not directly programming any php apps.

    Edit: I'm starting to read this book:

  2. Digital Doctor

    Digital Doctor Well-Known Member

    Then reading a book isn't for you.
    Is one of your goals to make a Xenforo addon ?
    If it is ... clarify an addon you would like to make. Not super huge. Just make sure you lay out what you want to do as specifically as possible.
    Once a goal is set ... learn what you need to accomplish that goal.
    It makes learning more relevant ... and it mimics the process you'll need to go through when you do the next project.

    The process is called problem-based, self directed learning.

    Of course, in the age of php forums, asking clear questions to get guidance can be very time productive.

    Nicer coders here are more than willing to provide guidance (Chris Deeming, etc.).

    It also helps alot to look at code. Look at a few of Chris' smaller addons. See what goes into it. (... maybe even ask Chris about specific lines of code and why they work ... he might not be able to hold your hand but he might tell you want chapter to read !).

    Hope that helps
  3. we_are_borg

    we_are_borg Active Member

    Lynda.com has a tutorial online called "PHP With MySQL Essential Training" learned a lot of that video. If you can follow the video the books become more understandable and easier to read. I to had the same problem that books did not work but now its a bit easier.
    Brent W likes this.
  4. s.molinari

    s.molinari Well-Known Member

    Nice tips. I find the "set your goal" type of learning the best way too. Although, if you want to learn more about concepts, then books (and good Internet articles, videos, tutorials, blogs, etc.) are the best way to start. And for the most part, concepts are what you need first to understand the details like how to program in PHP. For instance, if you just dive into PHP and don't understand the basic concepts of the Internet and how web servers work with their clients (browsers, apps for mobile devices, etc.), then programming a php script is going to be a mighty big, and most likely, frustrating task. So read books for understanding the concepts, then get down to the nitty gritty like DD says, by making yourself some goals of what you'd like to accomplish and dig in further from there.

    And for sure, definitely don't be too hard on yourself, when you read a book from start to finish and still can't do what you intended to learn, before you started reading the book. In 99.9% of the cases, that will never happen.:)

  5. wickedstangs

    wickedstangs Well-Known Member

    you might also try www.LVSOnline.com lots of great hands on... I am taking a class now on Java Script..

    Here is an example from basics
  6. James Freeman

    James Freeman Member

    That is a horrible tutorial. Who uses BGCOLOUR? You should use inline instead of that - style="".

    But, I would much much rather use external
    background: red;
    w3schools is better resource. Amazing tutorials and they _kinda of_ follow up-to-date web standards.
  7. Jason

    Jason Well-Known Member

    W3School is terrible. A lot of their information is either out-of-date or plain inaccurate. To this day, there are still PHP examples that have open SQL injection vulnerabilities. It doesn't help that most people will assume a lot of the examples they show are best practice, and copy & paste them.

    W3Fools is pretty much a rant page, but it's at least a good start http://w3fools.com/#what-should-be-done

    For PHP, http://www.phptherightway.com/ is a pretty good resource.
    Boothby and Andrej like this.
  8. meSingh

    meSingh Active Member

    If you have got a basic understanding of php and helper functions then i will suggest you to stop reading any more books and start exploring. Start with creating small set of codes and then go for big.

    Here are a few examples you can start with:
    • Create a small script that takes a 2 inputs from user and then check if they match
    • Now make it to store the data added by user in a text file
    • Now make it to check if a data already exist in that text file
    Just keep exploring and try different scripts then try to create anything you see on web. In case you need any help or not getting how to do particular thing, try searching over stackoverflow.com else just post it here. I am sure someone will get you an answer in seconds.

    This is how i started and still doing. So far it has been really good for me and hope this also makes some difference for you too :)
  9. Brent W

    Brent W Well-Known Member

    I just signed up today and will start that soon
  10. slowreflex

    slowreflex Member

    I've also been doing the w3schools.com free lessons. They have html/css/php/javascript/jquery/etc. tutorials, sample files, quizzes, etc. Even have their own mini-compiler to show the results of basic code. A bit more interactive than a book.

    I'm also going through the Learning PHP, MySQL, JavaScript, and CSS book that you mentioned in the OP too though. It's not bad.

    Lastly, I'd say a good IDE helps with learning too, especially with things like auto-complete. I've researched/tested a lot and phpstorm is the best to me. Or if you like a simpler text editor type then Sublime Text is very popular.

    Find some good sample code and then try and reverse engineer it to figure out how it works.
  11. meSingh

    meSingh Active Member

    In case you want to check few more tutorials before going to start coding. You MUST check this site. They have some awesome courses that will help you for sure.
  12. meSingh

    meSingh Active Member

    Don`t know how i forgot that :p

    Sublime Text will be a best choice.
  13. Brent W

    Brent W Well-Known Member

    ShadyX likes this.
  14. slowreflex

    slowreflex Member

    I think that's exaggerating quite a bit. It's not perfect, but it's still useful as a starting point. I'm not talking about getting "certified" through them, just using the free resources they have. I'm also not talking about using it as a reference. There are lots of other resources on the net, but I like how w3schools is nicely organized and straightforward.
  15. Lucas

    Lucas Well-Known Member

    Lot of great suggestions in here I have to say, thanks for the feedback guys. I'm debating whether to create just some simple php app or try and create a simple XenForo addon. I'd think it'd be much more motivating actually being able to use whatever you end up building.
  16. we_are_borg

    we_are_borg Active Member

    W3schools stay away from it some stuff is just wrong. Also security is not an issue with them.

Share This Page