Try using foreach:
foreach($i as $key => $val)
{
echo "<input type=\"text\" name=\"$key\" value=\"$val\">";
}
As long as you declare an array $i, and assign some values to it, such as:
$i = array ("Bert", "Sharon", "Betty", "Harry");
This should output a text input box for each value in the array.
Hope this helps.