Tomasz
|
| Posted: 04/23/2003, 8:25 AM |
|
I'm trying to build page with editable grid:
it will contain 10 rows, each with textboxes and listboxes.
I have problem with filling custom listbox with array values.
In open event of grid form I have:
$delivery_items = db_fill_array("iu_id, iu_name FROM item_units ORDER BY iu_id ASC");
if(is_array($lookup_delivery_items))
{
reset($lookup_delivery_items);
while(list($key, $value) = each($lookup_delivery_items))
{
$tpl->set_var("ID1", $key);
$tpl->set_var("Value1", $value);
}
}
and then in form header some html using {ID1}, {Value1}.
But page displays first value from array, not all of them. What is wrong? (I'n not a programmer, pls forgive stupid questions)
|
|
|
 |
Tomasz
|
| Posted: 04/24/2003, 8:05 AM |
|
of course code is:
$delivery_items = db_fill_array("iu_id, iu_name FROM item_units ORDER BY iu_id ASC");
if(is_array($delivery_items))
{
reset($delivery_items);
while(list($key, $value) = each($delivery_items))
{
$tpl->set_var("ID1", $key);
$tpl->set_var("Value1", $value);
}
}
can anybody have a look?
|
|
|
 |
|