Best way to learn how to code PHP?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lastrain13
    New Member
    • Jan 2006
    • 8

    Best way to learn how to code PHP?

    Hi everyone,

    I plan on starting a community sooner or later and I'd really like to be able to code my own mods for it rather than download them. Or atleast be able to customize the ones that are for download.

    I'm not really sure where to start learning PHP though. I bought a book (Core PHP Programming - third edition, fully revised for PHP5) and I have been reading it and I learned how to do a couple simple scripts, but I have no idea how to apply them to make a mod for vbulletin..

    Is reading a book the best way to learn? Any advise is appericated .
  • Creepshow
    Senior Member
    • May 2005
    • 2309
    • 3.5.x

    #2
    Originally posted by lastrain13
    Hi everyone,

    I plan on starting a community sooner or later and I'd really like to be able to code my own mods for it rather than download them. Or atleast be able to customize the ones that are for download.

    I'm not really sure where to start learning PHP though. I bought a book (Core PHP Programming - third edition, fully revised for PHP5) and I have been reading it and I learned how to do a couple simple scripts, but I have no idea how to apply them to make a mod for vbulletin..

    Is reading a book the best way to learn? Any advise is appericated .
    www.php.net is the place to start mate.
    "CREEPSHOW CREEPS ONLINE" - The first & best online resource dead-icated to Stephen King & George A. Romero's 1982 horror anthology classic!!!!

    Comment

    • daemon
      Senior Member
      • Jun 2003
      • 2351
      • 3.5.x

      #3
      If you have any programming experience, then go to www.php.net (like Creepshaw suggested) and learn the semantics, and then just browse the vBulletin source. I learned PHP mostly by just reading vBulletin source and playing around.

      However, if you don't have any programming experience, www.php.net may be a little over your head. I'd suggest reading the book and make sure you have a grasp on PHP and basic programming concepts, then just setup a test vB forum and start tweaking things and playing with the code.

      For reading the source, start with /index.php and follow all the require_once()'s to trace the lineage of variables and functions. It'll take a while, but then you'll know where everything is in the source, too. Killing two birds with one stone!

      Also, don't expect to learn overnight. It'll take time to get to know the language enough to develop rapidly.
      Bugdar: PHP bug tracking software that is beautiful, fast, and robust.

      Comment

      • harmor
        Senior Member
        • Aug 2003
        • 1334

        #4
        It'll take time to absorb php

        The best thing do do is start off small then add to it.

        Take
        PHP Code:
        <?php
        echo "This is the main page";
        ?>
        Then add conditionals to it
        PHP Code:
        <?php

        //test.php
        if(empty($_REQUEST['do']))
        {
        echo 
        "This is the main page";
        }

        //test.php?do=subpage1
        if($_REQUEST['do'] == "sub_page1")
        {
          echo 
        "This is on a subpage";
        }
        ?>
        Once you famialarize yourself with a function then add another one to your code.

        Comment

        • DirectPixel
          Senior Member
          • Jan 2002
          • 4703
          • 3.5.x

          #5
          Originally posted by lastrain13
          Hi everyone,

          I plan on starting a community sooner or later and I'd really like to be able to code my own mods for it rather than download them. Or atleast be able to customize the ones that are for download.

          I'm not really sure where to start learning PHP though. I bought a book (Core PHP Programming - third edition, fully revised for PHP5) and I have been reading it and I learned how to do a couple simple scripts, but I have no idea how to apply them to make a mod for vbulletin..

          Is reading a book the best way to learn? Any advise is appericated .
          Getting a good PHP book can also be very useful. When I first learned PHP, I went to my local Barnes & Noble and bought myself one of those PHP Bible books. I figured, learning is the easy part--knowing all the functions and their parameters? I'd need a reference book for that.
          :)

          Comment

          • cbiweb
            Senior Member
            • Apr 2004
            • 2658
            • 4.1.x

            #6
            If you can find a copy of "Sam's Teach Yourself PHP in 24 Hours", you won't regret it. Easy to understand, and covers a lot of territory without being overwhelming.
            ~ Life isn't always fair, but you can be. ~

            Comment

            • roosevelt
              Senior Member
              • Jul 2004
              • 227
              • 5.0.X

              #7
              I used the following methods. they worked great for me and it will also for you if you really have passion for learning PHP .

              Book
              - PHP & MySQL Visual Quickpro Guide By Larry Ullman.
              - PHP & MySQL for Dummies by Janel Valade.
              - PHP Antalogy I & II by . www.sitepoint.com

              CD-ROM
              - PHP & MySQL Fundamentals by Joshua Mustufa www.vtc.com
              - PHP & MySQL Project solution by Dave Mercer www.vtc.com
              - PHP & MySQL Essential by Brian Maxx www.lynda.com

              Well I didn't get all of them at once. First I bought the VisualQuick Pro guide, and learned many of the basic stuff like form processing, file management. But I found it quite boring to read so I bought Fundamentals trainning series from VTC, and learned 85% by watching videos and practicing. After that I bought more books to use as referrence, to be a strong PHP programmer in an Object Oriented Approach. Those were my resources to master PHP & MySQL.
              Out to Change the world!

              Comment

              • silly rabbit
                Member
                • Oct 2005
                • 51
                • 3.8.x

                #8
                Originally posted by lastrain13
                I'm not really sure where to start learning PHP though. . . . a couple simple scripts, but I have no idea how to apply them to make a mod for vbulletin.

                Is reading a book the best way to learn?
                Yes, reading is the best way to learn but it doesn't neccessarily have to be BOOKS!! As far as 'mods' are concerned take daemon's suggestion and as a start try and follow the flow. 'php.net' (being the authors indeed) will give all the basic definitions you need but let me ask you this - how are you at CSS and HTML??? All work hand-in-hand and as far as the workings of Vbulletin's markup is concerned think of php as the 'logic' and HTML / Css as the 'visual flow'.

                php sytax is very close to 'C' so if you understand one you will understand the other and it's just a question then of finding it's uses & strenghts (thru standard functions).

                Not to overwhelm you with overload but some good sites come to mind:

                w3schools.com even has a split window test editor where you can practice your skills as you leaqrn

                'alistapart.com' gives good Css discussion with working examples to practice with . .

                htmldog.com has tutorial . .
                Last edited by silly rabbit; Fri 6 Jan '06, 11:32pm.

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...