PHP / MySQL

  1. Home
  2. Computing & Technology
  3. PHP / MySQL

Variable

By Angela Bradley, About.com

Definition: A variable is a character or string used to represent a value. It can represent a single value or an expression consisting of other variables. In the case of PHP a variable is used to represent any other data and always begins with a dollar sign [$].
Examples:
X = 5

In this expression, X is a variable

Y = 4 * Z

In this expression Y is a variable, as is Z

$cat = "Spot";

In PHP a variable is defined with a dollar sign [$] as $cat is above.

Explore PHP / MySQL

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

PHP / MySQL

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. Programing Glossary
  5. PHP Variable - Programming Variable - Math Variable

©2009 About.com, a part of The New York Times Company.

All rights reserved.