First off, php does indeed support named variables.
Example:
$freddy = "Hi I'm Freddy";
$var_name = "freddy";
print $$var_name;
The result is $var_name evaluates to "freddy" and the variable $freddy is printed.
But man is that UGLY. I would avoid it like the plague.
WRT to your situation...
When you say
<form type name=\"" . $fieldName[$i] . "\">
do you mean you have several forms?
Or do you mean several form inputs?
<input type='whatever' name=... />
Assuming the latter case, I would create your form like this:
// assume the name of your array of strings is $strings
reset ($strings);
foreach ($strings as $s) {
print "<input type=\"text\" name=\"my_input[$s]\" /><br />\n";
}
So if your array had "boo", "bat" and "bar", the output would be like this:
<input type="text" name="my_input[boo]" />
<input type="text" name="my_input[bat]" />
<input type="text" name="my_input[bar]" />
PHP will make an array called $my_input when the form is submitted.
You can process the input doing something like this:
reset ($strings);
foreach ($strings as $s) {
print "$s is ".$my_input[$s]."<br />";
}