How to get started with PHP as a complete newbie

How do you get started with PHP as a complete newbie?

A common question that I get asked is

How do I get started with PHP?

The following is a simple recipe to get you started with PHP.

You’ll need the following basic ingredients for success:

  • A reasonably modern computer running Windows
  • A text editor, notepad for example
  • A web browser, like Chrome or Firefox

Then follow these instructions to cook up your first “hello world” PHP page:

  1. Setup a local webserver on your computer, by installing WAMPSERVER – download from here
  2. Once installed, right click on the WAMPSERVER icon in your Sys Tray and click on “www directory”.
  3. Create a new folder called “Project1”
  4. Enter the folder
  5. Create a new file, called index.php
  6. Edit the file with your text editor, notepad will do
  7. Enter the following code into the file, or copy and paste from here:
  8. <?php echo "Hello World!";
  9. Save the file
  10. Open your web browser and navigate to this URL: http://localhost/Project1
  11. You should see a page with the text “Hello World!” displayed in it
  12. Congratulations you’ve successfully made your first PHP page!

Leave a Reply