The ABC's of PHP Part 4 - How Variable Am I?
Apr 02, 2009, 23:32 (0 Talkback[s])
(Other stories by Peter Shaw)
"What is a variable?
"Put simply, a variable is an area of memory that has a
convenient name assigned to it, this area of memory can then be
used to store any data related to your script for further use later
in your script.
"Under PHP, variables are indicated by prefixing the name with a
dollar sign. So for example to declare a variable that might be
used to hold a name you might use:
$name = "peter";
"In the above case PHP assigns a string of data containing the
word "peter" to a memory address and then points the identifier
$name to it so that's it's easy to remember and use."