Skip to main content
Menu
CodeBabes
  • Create new account
  • Request new password

or

  • Sign in with Twitter
  • Code
  • Babes
  • Sign Up
  • Log In

Share the Love

  • Tweet

PHP Virgin

This is the Codebabes PHP virgin course. Now we’re finally getting to the real shit. PHP is the most popular server-side programming language on the web. It’s what makes CMS systems like Wordpress and Drupal go. Facebook was originally written in PHP, so if you want to be the next bad ass brogrammer, it’s not the worst place to start.

In this course we’ll go over the basics of PHP. We’ll assume you have some kind of server running so that you can run PHP. Unfortunately you can no longer just use your browser to look at HTML. If you did that with PHP nothing would happen, because the server needs to process the PHP.

To run a server to process PHP on your computer you can use two easy to set up programs, either WAMP for windows or MAMP for Mac. These programs will set up everything you need to develop dynamic sites right on your computer, Apache, PHP, and mySQL.
https://www.mamp.info/en/
http://www.wampserver.com/en/

You’re going to need a basic understanding of HTML, a computer, access to a web server, a browser and your brain. Your brain, a lot, so keep that blood flow headed the right direction.. (wink wink)

PHP is a server side language that allows you to create dynamic pages that interact with databases, and forms. So what does server side mean? Well, when you go to a website, your computer is the client, it is requesting a web page from a server somewhere. Usually this is just a server in a giant building somewhere, but some marketing MBA douche coined these server farms the ‘cloud’. A static page would just get served up, but if it’s a PHP script, the server executes the code on that page.

Let’s start with the hello world program for PHP, and we’ll also see some PHP syntax. Go to your web directory. In our case it’s in the Sites directory. This is where the webserver on our computer is watching. Anything within this folder will be interpreted by the webserver if it gets opened. Lets create the file, ‘helloworld.php’ in our ‘site’ directory. Now write the PHP, like so:

When the web server parses this file it will print out the line “Hello world”.

And we’re programming, bitches.

Print is what’s called a function. Functions perform a predefined action for you.

You can also add HTML markup to the print statement. Let’s add some h1’s around hello world and create an html element like so:

Hello World

.

Now look at the web page. You’ll see that only the html code appears. You’ll never see the PHP because it is parsed on the server side, behind the scenes. Awesome work, lets move on and turn things up a notch.

Questions or Comments?

Lessons

  • PHP Variables
  • PHP Conditionals
  • PHP Arrays
  • PHP Loops
  • PHP Functions

Downloads

SignUp & Subscribe

Links to Awesomeness

PHP.net Installation Manual PHP.net Installation Manual

What the What?

Lessons: 41

Much more to come!

50/50 Entertainment and Education. Learning doesn't have to be boring :)

Our Philosophy

Contact

  • support
  • Tweets!
  • Youtube
  • Google Plus
  • Facebook

Stuff

  • Blog
  • Sign Up
  • All Babes
  • All Courses
  • Become a CodeBabe!
  • MAKE A LESSON WITH CODEBABES!

Recent Courses

Internet Virgin
SEO Virgin
HTML Virgin
CSS Virgin
Programming Virgin with Javascript

Learn to Code with Babes

Copyright © 2025 CodeBabes.com • Made with

  • Privacy Policy
  • Terms of Use
Close Menu
  • Blog

  • All Courses
  • Android Virgin
    • Android Studio Tour
    • App Layout in Android Studio
    • Java Variables, Java Data Types & Android Views
    • Java Event Handling in Android
    • Android Intents, OOP This, Variable Scope
    • Passing the Data with Android Intents & Finish
    • Complete the Android App with Launcher Icons & APK
    • Android Happy Ending
  • Internet Intro
    • Backend Development
    • Front End Web Development
    • Programming Tools you Need
    • Hosting and Domain Names
  • HTML Virgin
    • HTML Text Tags
    • HTML Links and Images
    • HTML Layout with HTML 5
    • HTML Tables
  • CSS Virgin
    • Where to Stick your CSS
    • CSS Properties, Sizes and Colors
    • CSS Selectors
    • CSS Box Model
  • Programming Virgin
    • Variables in Programming
    • Programming Intro Conditional Statements
    • Programming Intro to Arrays
    • Programming with Loops
    • Programming with Functions
  • PHP Virgin
    • PHP Variables
    • PHP Conditionals
    • PHP Arrays
    • PHP Loops
    • PHP Functions
  • SEO Virgin
    • Make Google Love You
    • Understanding Keyword SEO
    • Optimizing for SEO
    • Technical SEO