So add a counter that is set initially to the number of rows, and increases
after inserting each number.



On Sun, Dec 19, 2010 at 11:32 AM, lidgold <[email protected]> wrote:

> Thanks Arian,
> as you suppposed I'm using 1.2. I've added the attributes as you suggested,
> and now it works.
> Still some problems with item number.
> My goal is to obtain an array of items, so I should have
>
> <tr>
> <td><input id="item_id" name="item[0][item_id]" value="" /></td>
> <td><input id="item_name" name="item[0][item_name]" value="" /></td>
> </tr>
>
>
> <tr>
> <td><input id="item_id" name="item[1][item_id]" value="" /></td>
> <td><input id="item_name" name="item[1][item_name]" value="" /></td>
> </tr>
>
> and so on for each new row.
>
> This way the resulting array will be:
>
> Array ( [0] => Array ( [item_id] => 25 [item_name] =>'one name' ) [1] =>
> Array ([item_id] => 26 [item_name] =>'another name') )
>
> If I have no progressive number after lap, I will get:
>
> Array ( [0] => Array ( [item_id] => 25 [item_name] =>'one name' ) [1] =>
> Array ([item_id] => 26) [2] => Array ([item_name] =>'another name') )
>
> item_id and item_name of the second row becomes two separate arrays.
> If I post them like this, I can't store them inside my table.
>
> Any suggestion?
> Thanks again.
>

Reply via email to