Home > Learning > Learn PHP Fast

Learn PHP Fast

PHP is the most important server side language to understand these days since it is the most widely used development framework for websites.

Once you have mastered the basics of HTML and CSS, it is time to learn PHP.

Although it is easy to learn in my opinion, a problem is that it has a vast amount of functions, so you may be overwhelmed with where to start.

So to learn PHP fast, I recommend following tutorials on how to implement practical things in web pages. For example, web page customization depending on the visitor. Sending yourself an email. Altering javascript with PHP.

This way you will learn what is important to know right away and not spend a lot of time studying things that you may not need for a long time to come.

To make your learning experience more comfortable, I highly recommend testing your code on your computer rather than continually uploading to the web and refreshing your browser. This will save you a lot of time and frustration.

And when entering the code, use a code editor that highlights the PHP with color so it is easier to spot typos and read the code.

The following tips contain links to Windows resources (Linux users may already have a suitable web server environment installed on their computer).

To run PHP on your computer, install an Apache web server {Win32 Binary without crypto (no mod_ssl) (MSI Installer)}, PHP5 (Windows Binaries -> PHP5 Installer) and MySQL (MySQL Community Server). You can download these from the respective websites or install a pre-configured package such as XAMPP.

And for editing your code use NotePad++

For serious development work and having the ability to step through your code for easier debugging, I recommend Net Beans IDE.

And to learn PHP fast check out Learn PHP in 17 Hours.

Post to Twitter

Categories: Learning Tags:
  1. June 27th, 2010 at 06:38 | #1

    Yes, PHP is widely used for websites, but there is MySql. Both together are great.
    Nice post, thank you

  2. July 2nd, 2010 at 22:14 | #2

    Do you have a tip on how to configure apache on your local machine (localhost) in such a way that you can work on several sites w/o always changing the setup?

  3. Andrew
    July 3rd, 2010 at 09:22 | #3

    @How to Speak Japanese
    Yes, you add entries for the virtual hosts to the Windows hosts file. This is located in:
    c:\windows\system32\drivers\etc

    Open this for editing with NotePad started as an administrator. And select all files (*.*) when browsing.

    Add entries to the hosts file for the virtual hosts such as:
    127.0.0.1 sitea.com
    127.0.0.1 siteb.com

    And in the Apache httpd.conf file look for # virtual hosts

    Then remove the # symbol from the next line to have the line of code:
    Include conf/extra/http-vhosts.conf

    Save the file.

    Now open conf/extra/http-vhosts.conf and add your virtual host entries such as:

    <VirtualHost *:80>
    VirtualDocumentRoot C:/htdocs/sitea
    ServerName Site A
    ServerAlias sitea.com
    </VirtualHost>

    <VirtualHost *:80>
    VirtualDocumentRoot C:/htdocs/siteb
    ServerName Site B
    ServerAlias siteb.com
    </VirtualHost>

    In this case the hosts will be mapped to C:/htdocs/sitea and C:/htdocs/siteb

    Then restart the Apache server.

    So now you should be able to enter the virtual URLs (no www. in this example) for these sites into your browser and have the locally hosted sites displayed.

  4. July 5th, 2010 at 01:38 | #4

    PHP know is a great skill to know. Having even a basic knowledge can really help you tweak and modify your wordpress blog. And xampp is awesome.
    Nick Stewart´s last blog ..Does search engine optimization matter anymore

  5. July 5th, 2010 at 17:52 | #5

    @Andrew
    Thanks for the detailed explanation – will give it a try.
    Am just in the process of rebuilding my system (HD upgrade and fresh install) so I can resally start out fresh.

    Have a good week!

  6. Andrew
    July 7th, 2010 at 01:25 | #6

    @How to Speak Japanese
    Let me know if you hit any problems configuring the local webserver. I posted what i did with Windows 7 on my laptop computer apart from I didn’t actually use sites called site A and B.

  1. No trackbacks yet.

CommentLuv Enabled