Do the following:
<select name="tours[]" size="8" multiple>
The "tours[]" turns your var into an array, and all selected options will be in this array.
To extract the array, do the following:
$cnt = count($tours);
for($x=0; $x<$cnt; $x++)
{
print($tours[$x] . "<br>\n");
}
Or, whatever variation theresuch...
Bonus
You can also IMPLODE the array into a single string, and then later, EXPLODE it back into an array:
$tours = array("US","Mexico","Moon");
$myStr = implode($tours,",");
print($myStr);
OUTPUT --> US,Mexico,Moon
$tours = array("US","Mexico","Moon");
$myArray = explode(",", $tours);
$cnt = count(myArray);
for($x=0; $x<$cnt; $x++)
{
print($myArray[$x] . "<br>\n");
}
OUTPUT -->
US
Mexico
Moon
Jason