Hi,
I'm trying to pass values from an array into a form. As a newbie, I've came up with the code underneath, but I want to pinpoint all the first values toward 1 selection list in the form. Any suggestions how to accomplish this?
Thanks in advance.
Ruud
<html>
<head>
<title>Test formulier</title>
</head>
<body>
<h2>Test formulier</h2>
<form action="test.php" method="post">
<p>
<?php
$prijzen = array(
array("01", "125","150", "A" => true,"B" => true),
array("02", "125","150", "A" => true,"B" => true),
array("03", "125","150", "A" => true,"B" => false),
array("04", "125","150", "A" => true,"B" => true)
);
?>
</P>
<select name="prijzen[]" id="prijzen" multiple="multiple" size="7" class="none">
<?php
while(list($key, $val) = each($prijzen)){
while(list($key2, $val2) = each($val)){
echo '<option value="'.$key2.'">'.$val2.'</option>'.PHP_EOL;
}
}
?>
</select>
</body>
</html>