It
MUST be the actual array key. Suppose you have the following array:
$p2p_posters = array("nikolai" => "USA", "jefferis" => "USA");
unset($p2p_posters[0]) won't do anything, because $p2p_posters[0] doesn't exist.
The ampersand (&) in front of the $value parameter means that you're accepting a REFERENCE to the parameter.
The default parameter passing mechanism in PHP is to pass copies of values around, so any modifications to those items ONLY modify the copy of the variable local to the scope of the called function.
By passing the item by reference, you're really saying "this variable is an alias for this other piece of data defined in some other scope". By "piece of data", I could mean a variable of any type, or the value stored in an array.
Quick example:
function change_value($var)
{
$var = 12345;
}
function change_reference(
&$var)
{
$var = "Look at this!!";
}
$foo = 5;
echo "initial value: $foo"; // prints "initial value: 5"
change_value($foo);
echo "after change_value(): $foo"; // prints "after change_value(): 5"
change_reference($foo);
echo "after change_reference(): $foo"; // prints "after change_reference(): Look at this!!"
For more info, read up on references in the manual:
http://www.php.net/references
Take care,
Nik
http://www.bigaction.org/