I hope this is correct. You want the user to designate the size of an array, fill the array with values, then read back from the array. You can do this by using an array in the html document, then letting php read from this array that you have created. Like below:
<?
echo "<form action=\"test.php\" method=post>";
Output the final array values
if (isset($what)) {
for ($i =0; $i < sizeof($what); $i++) {
echo "Array $i = " . $what[$i] . "<br>";
}
}
After user chooses size of array,
Allow user to input data into
else if (isset($size)) {
for ($i =0; $i < $size; $i++)
echo "Array [" . $i . "] : <input type=text name=what[$i] size=10><br>";
echo "<input type=submit value=\"Create Array\">";
}
Let user choose size of array
else {
echo "Sizeof Array <select name=size>";
for ($i =0; $i < 10; $i++)
echo "<option>$i</option>";
echo "</select><br>";
echo "<input type=submit value=\"Create\">";
}
?>
This does not use strings to name variables, it uses an array. Anyway, hope this helps. If I am way off track, please respond.
Mike J