sorry, i'll try to be more specific:
first of all i have a table with these columns:
• file_1
• thumbnail_1
• title_1
• file_2
• thumbnail_2
• title_2
• file_3
• thumbnail_3
• title_3
...
• file_10
• thumbnail_10
• title_10
so on my page i created input fields with FOR loop:
for ($i=1; $i <= 10; $i++) {
echo "THUMBNAIL $i: ";
echo "<input name='thumbnail_$i' type='text'><br>";
echo "FILE $i: ";
echo "<input name='file_$i' type='text'><br>";
echo "TITLE $i: ";
echo "<input name='title_$i' type='text'><br>";
}
echo "<input name='submit' type='submit' value='[SUBMIT]'>";
and that part works ok.
but when i want to use edit mode i have to pull out values of the fields from a table. i want to do that with FOR loop again. so it would be something like this:
for ($i=1; $i <= 10; $i++) {
echo "THUMBNAIL $i: ";
echo "<input name='thumbnail_$i' type='text' value='$row[\'thumbnail\']'><br>";
echo "FILE $i: ";
echo "<input name='file_$i' type='text' value='$row[\'name\']'><br>";
echo "TITLE $i: ";
echo "<input name='title_$i' type='text' value='$row[\'title\']'><br>";
}
echo "<input name='submit' type='submit' value='[EDIT]'>";
ok, that will obviously not work because $row[thumbnail], $row[name] and $row[title] don't exist. so i would like to join $i to that $row[...] variable so it would produce $row[thumbnail_1], $row[thumbnail_2], $row[thumbnail_3] etc. and same with the $row[name_1], $row[name_2]... and $row[title_1], $row[title_2]...
so, that's it i think... hope that you will now understand my problem...
thanks in advance!