Welcome Guest, Not a member yet? Register   Sign In
Re-populating form with 2 dimensional indexed array
#2

[eluser]meigwilym[/eluser]
Assuming your fieldsets are identical:

Code:
$i = 0;
foreach($expenses as $e)
{
    echo '<input type="text" name="name[$i]" value="'.set_value($e['name']).'" />;
    echo '<input type="text" name="amount[$i]" value="'.set_value($e['amount']).'" />;
    $i++;
}

Or something like that, depending on the exact situation.

Mei


Messages In This Thread
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 04:18 AM
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 05:05 AM
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 05:23 AM
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 08:17 AM
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 08:28 AM
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 08:45 AM
Re-populating form with 2 dimensional indexed array - by El Forum - 02-22-2012, 01:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB