PHP Variables 
PHP Variables
by Brad Hussey
Video Lecture 8 of 45
Not yet rated
Views: 1,068
Date Added: May 14, 2017

Lecture Description

Lecture 8: PHP Variables

Think of a variable as a bucket. Literally, a bucket. That bucket can hold stuff in it — like food, or dirt. In PHP, variables are buckets, but instead of holding food or dirt, they hold information — like numbers, text, images, or logic! All you need to know at this point is that variables are buckets that store information for later use. We'll get to how we actually use the variables in an upcoming lecture.

The basic syntax of a variable is a dollar sign ($) directly followed by a variable name (using text, with no spaces), then an equal sign, followed by the contents of the variable, ending with a semi-colon. Ex: $variable_name = 'my first variable';

There are 4 basic variable types, and each type of variable (or "bucket") is meant to hold specific information. Watch the lecture or download the PDF to learn what the 4 basic variable types are.

Course Index

Course Description

This course is a Total Beginner's Guide to Coding Your Very Own Dynamic Websites with PHP, so you need no prior knowledge or experience — although it's a good idea that you know some HTML (my beginner's guide "Build a Website from Scratch with HTML & CSS" will get teach you everything you need to know).

So — why learn PHP? Well, PHP is a very powerful scripting language used by millions of websites. Some of the most popular websites and frameworks utilize PHP to build their dynamic websites. PHP works very well with HTML, and therefore will allow you to start coding dynamic websites quickly without having to learn some of the more complicated scripting languages out there.

Comments

There are no comments. Be the first to post one.
  Post comment as a guest user.
Click to login or register:
Your name:
Your email:
(will not appear)
Your comment:
(max. 1000 characters)
Are you human? (Sorry)