What's the easiest way to learn PHP?

Discussion in 'PHP' started by rochow, Aug 28, 2008.

  1. #1
    I already know HTML+CSS and am looking at learning PHP. What's the quickest way? Due to work commitments I don't have tons of time to simply pull apart existing scripts and see how they work like I did with HTML (trial+error is great its just slow). I already know bits and pieces of VB, JS, PHP, CF etc so I understand the "logic" of them, I just have no idea what to write to make it do what I want :D

    - Are there some good sites?
    - Would a book be better? If so, what one?

    In 2 hours a day, 5 days a week (10 hours a week) how many months would it take to become pretty good at PHP? Enough to be able to make pretty much anything just obviously not pro, using all the best methods etc. Once I know how long it'll take roughly I can set some goals to reach.
     
    rochow, Aug 28, 2008 IP
  2. trtrtrtr

    trtrtrtr Greenhorn

    Messages:
    32
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #2
    Hi there ;
    you can start by simple tutorials ,, just google for php tutorials , try guestbook tutorials
    thanx
     
    trtrtrtr, Aug 28, 2008 IP
  3. mkda

    mkda Active Member

    Messages:
    139
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #3
    mkda, Aug 28, 2008 IP
  4. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #4
    Got 131 reviews and 4.5/5 rating, looks good. PHP6? Well that's another question then - what do I learn? 4, 5 or 6? I'd assume they're semi-interchangeable like HTML; the basis is the same, just new tags are made, some are deprecated.
     
    rochow, Aug 28, 2008 IP
  5. Social.Network

    Social.Network Member

    Messages:
    517
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    35
    #5
    Enough to make pretty much anything? This is a tall order of course. I am a .NET and J2EE engineer with over a decade of programming experience. I am transitioning to PHP and can tell you from my experience that it has taken me over three months of late night and weekend learning. I am using a web application framework to address the core plumbing, but it is taking time. Also, I make time to review popular open-source projects to learn the approaches used in PHP. I have very little time too. I work a minimum of 12 hours per day and average about 14 hours. That is no excuse, I make the time period. Lastly, everyone learns differently so if it takes me 3 months it may take you 1 or 12. Depends on the students aptitude, knowledge, and skills. Good luck!
     
    Social.Network, Aug 28, 2008 IP
  6. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #6
    Anything my heart desires. I'm not going to make the next Wordpress or Joomla or anything over the top like that :D Things like member sites, secure areas - useful things that clients (particular businesses) will want. Right now I'm attempting to make a basic CMS, it fetches info from a table (which I'm going to make an install script that sets the whole table up) and displays it using a template :D The admin backend is months away (or any usable version that is secure and bug free enough) but the fact I can sometimes get it to do what I want is awesome! I feel invincible :cool:

    Speaking of frameworks, would it be best to use a framework or learn from scratch? Frameworks seem like a shortcut (get started quickly) but due to that in the long run they aren't any better as entually you have to learn everything and not rely on the frameworks built in functions. I could be wrong, I'm just going off CSS frameworks, of which I prefer my own.

    Is it good to make functions for everything? Like connect to database, disconnect from database, fetch and echo the page title and so forth.
     
    rochow, Aug 28, 2008 IP
  7. Karin_Elliott

    Karin_Elliott Peon

    Messages:
    28
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Hi rochow,

    My advice is to get a book that covers both MySQL and PHP. I don't think the version of PHP is all that important as long as it's fairly current. Most of the heavy lifting you're going to do with a CMS is going to be done using both PHP and MySQL, so I think learning about both is important. I agree with you that frameworks can come later. Learn the basics first.

    Get your CMS working on pure PHP and MySQL first. My bet is that if you're working on CMSs, you'll eventually start needing some Javascript. You can start learning about Javascript, AJAX, and some of the AJAX frameworks like Prototype. It'll all make a lot more sense if you've got a good foundation to start with. I wish you the best of success with your CMS!

    PS - Be sure you learn how to use basic AJAX calls first before you start to mess around with Prototype. Otherwise your brain may very mell melt and ooze out of your ears. :)
     
    Karin_Elliott, Aug 28, 2008 IP
  8. scriptdance

    scriptdance Active Member

    Messages:
    340
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    58
    #8
    My advice is to study small opensource php project.
     
    scriptdance, Aug 28, 2008 IP
  9. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #9
    Yep, at first I avoided SQL however it is better than flat-file in a lot of cases. Flat file is handy for small scripts so that they just FTP it and install it, no having to login and create databases.

    I think I'm using PHP4, that's the most used I believe.

    JS and AJAX would be great, 1 at a time though :D

    Get any small open source project and just have a look at it and see how it works?
     
    rochow, Aug 28, 2008 IP
  10. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
  11. babanner

    babanner Well-Known Member

    Messages:
    104
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #11
    Like the last post i recommend w3schools.com . Sincerley that is the place i learned web programming for real. It is the best place to start as they offer detailed tutorials and examples to guide you from the first steps in the php programming world to the php programming as a pro.
    It is also an amazing place to learn the others pr. languages like javascript, asp...
    You go with w3schools!
     
    babanner, Aug 28, 2008 IP
    camp185 likes this.
  12. babanner

    babanner Well-Known Member

    Messages:
    104
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    108
    #12
    Oh! I forgot. Also install xampp and get a good editor like dreamweaver cs3 or cs4(in beta)
     
    babanner, Aug 28, 2008 IP
  13. sherl0ck

    sherl0ck Active Member

    Messages:
    120
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #13
    do some project with php
    that would give you a kickstart
     
    sherl0ck, Aug 28, 2008 IP
  14. rochow

    rochow Notable Member

    Messages:
    3,991
    Likes Received:
    245
    Best Answers:
    0
    Trophy Points:
    240
    #14
    I used W3Schools for the tutorial on SQL. They don't seem comprehensive (if you were already intermediate and wanted to turn pro) but are great for beginners like me. I already have xaamp and use Notepad++
     
    rochow, Aug 28, 2008 IP
  15. Inersha

    Inersha Active Member

    Messages:
    182
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #15
    The way I learnt was to watch a bunch of videos from:

    www.phpvideotutorials.com
    www.killerphp.com

    Then I just looked through tutorial sites like:

    www.tizag.com <- awesome
    www.w3schools.com

    The key is to try and program as you go along watching and reading those tutorials, because it really helps loads. I've got a basic understanding of PHP, and it only took me about 2 weeks before I was coding simple and effective scripts.
     
    Inersha, Aug 29, 2008 IP
  16. Agent_Smith

    Agent_Smith Well-Known Member

    Messages:
    890
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    145
    #16
    Trial and error.

    Pick a script you would like to code, code it :) With a help from some tutorial sites of course. www.tizag.com being the best tut site.
     
    Agent_Smith, Aug 29, 2008 IP
  17. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #17
    Yeah, I'd suggest tizag.com, w3schools.com and phpvideotutorials.com - Like its been mentioned above, the time it will take you to learn is completely dependant on your current mindset on programming methods, how quickly you can adapt and how much you want to learn. I think 3 months is a good estimate for you if you throw yourself into it

    Jay
     
    JAY6390, Aug 30, 2008 IP
  18. imphpguru

    imphpguru Active Member

    Messages:
    439
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #18
    Hey! Well learning PHP, I would advise you to go to PHP.net, read a few things, and start developing a small application, maybe like a calculator. Slowly, you will get a nag of it. Once you reach a certain level, join me on my website www.loveofphp.com, which I have dedicated for PHP developers only. I am sure, you'd find interesting stuff over there :D.

    Other than that, you could consult www.w3schools.com, www.phpfreaks.com, www.tizag.com and many more. You have a pool of tutorials out there... go get one!!

    Thanks

    imphp
     
    imphpguru, Aug 30, 2008 IP
  19. definitely

    definitely Well-Known Member

    Messages:
    520
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    160
    #19
    just goto http:// phpbuddy dot com... its got all you need to startup... ;)
     
    definitely, Aug 31, 2008 IP
  20. Ilyes

    Ilyes Banned

    Messages:
    129
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Ilyes, Sep 1, 2008 IP