fireburner69
Programmer
OK my question is is there a way to generate the variable names with in a loop! for example
I have send the vars field1 and field2 and I want in the display to show what are tha vars
so i want to use value=$field1 but i want within the loop to generete the numbers according to the $cellz for example if I have $cellz= "10" to make automatic tha values from $field1 to $field10
I used something like $\"field$num\" but always comes up $"field1"
Can someone help me out
$num = "1";
while ($num <= $cellz) {
echo "<p> $stoixeia<b> </b><b>$num</b>
<input type=\"text\" name=\"field$num\">";
$num = ($num + "1"
echo " $stoixeia<b> </b><b>$num</b>
<input type=\"text\" name=\"field$num\">
</p>";
$num = ($num + "1"
};
I have send the vars field1 and field2 and I want in the display to show what are tha vars
so i want to use value=$field1 but i want within the loop to generete the numbers according to the $cellz for example if I have $cellz= "10" to make automatic tha values from $field1 to $field10
I used something like $\"field$num\" but always comes up $"field1"
Can someone help me out
$num = "1";
while ($num <= $cellz) {
echo "<p> $stoixeia<b> </b><b>$num</b>
<input type=\"text\" name=\"field$num\">";
$num = ($num + "1"
echo " $stoixeia<b> </b><b>$num</b>
<input type=\"text\" name=\"field$num\">
</p>";
$num = ($num + "1"
};