$cat[] = 'a';
$cat[] = 'b';
$cat[] = 'c';
$cat[] = 'd';
for ($c = 0; $c < count($cat); $c++)
echo "<input type=hidden name=cat[] value='$cat[$c]'>\n";
there ya go. this prog assumes that there are no gaps in the array. ie.
$cat[0] = 'a';
$cat[1] = 'b';
$cat[3] = 'd';
$cat[4] = 'e';
will not work....
$cat[0] = 'a';
$cat[1] = 'b';
$cat[3] = 'd';
$cat[4] = 'e';
foreach ($cat as $pos => $val)
echo "<input type=hidden name=cat[$pos] value='$val'>\n";
will work, its just more confusing.
Chris Lee