Arrays and PHP: A Primer - The fundamentals of memory allocation
(Page 2 of 6 )
The diagram shown below illustrates an abstract setup of a row of computer memory. The "Space" rows contain the memory address, while the "Values" rows contain the actual data, which is stored at that address:

For example, if we were to declare a variable named "arthur" in PHP like this:
<?php
$Arthur = "Value Entered";
?>Then this would be represented in our computers memory, like this:

Notice how the memory address has been replaced with "Arthur". The variable "$Arthur" is simply an alias for the real memory address where the value "Value Entered" is stored. If we were to point the variable $Arthur to another value, like this:
<?php
$Arthur = "New Value";
?>Then the memory address of the $Arthur variable would remain the same, and its value would be changed to "New Value".
Next: Arrays and their uses >>
More PHP Articles
More By Tuna Celik