Well the variable may be used in the indice.
Consider the following...
Dynamic creation of form text fields.
$i = 0;
$index[$i] = $i;
$text[$i] = "First Name: ";
$name[$i] = "first_name";
$value[$i] = $_POST["first_name"];
$type[$i] = "text";
$i++;
$index[$i] = $i;
$text[$i] = "Last Name: ";
$name[$i] = "last_name";
$value[$i] = $_POST["last_name"];
$type[$i] = "text";
for ($n = 0; $n <= $i; $n++)
{
echo "{$text[$i]}<input type='{$type[$i]}' name='{$name[$i]}' value='{$value[$i]}' /><br />\n";
}
The variable $i creates numeric indices in the arrays, and the for loop accesses the array using the last value of variable $i.
$foo = "Hello, World!";
$this_array["{$foo}"];
is the same as
$this_array["Hello, World!"];
No real limitations on this. For more information have a look at the PHP manual page on array syntax.
http://www.php.net/manual/en/language.types.array.php
Your question was kind of vague. I hope this gives you a little more insight into what is possible!
: )
Rich
:::::::::::::::::::::::::::::::::
Smiling Souls
http://www.smilingsouls.net
:::::::::::::::::::::::::::::::::