Как получить список значений выбраных в select c маркером multiple.
- Добавить к имени селекта '[]' (Пример, <select name=«select[]» ...)
- Тепер получить масив значений можно так: $_REQUEST[«select»]
<?
$list = array(
"10" => "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"20" => "Donec blandit nisl eu velit.",
"30" => "Curabitur ac ipsum id ipsum facilisis dictum.",
"40" => "Nullam gravida urna at massa.",
"50" => "Proin consequat semper sapien.",
"60" => "Integer tristique turpis ac erat.",
"70" => "Curabitur fermentum fringilla nibh."
);
$select = $_REQUEST["select"];
?>
Form:
<? foreach($list as $key => $value): ?>
<option value="<?=$key?>" <?=in_array($key, $select)?' selected="selected"':''?>><?=$value?>
<? endforeach; ?>
/>