<?PHP
// array contents array 1, value
$ddArray1 = ARRAY('Red','Green','Blue','Orange');
// array contents array 2, key => value
$ddArray2 = ARRAY('r'=>'Red','b'=>'Blue','g'=>'Green','o'=>'Orange');
// Values from array 1
PRINT '<select name="Words">';
// for each value of the array assign a variable name word
FOREACH($ddArray1 AS $word){
PRINT '<option value="'.$word.'">'.$word.'</option>';
}
PRINT '</select>';
//Values from array 2
PRINT '<select name="Words">';
// for each key of the array assign a variable name $let
// for each value of the array assign a variable name $word
FOREACH($ddArray2 AS $let=>$word){
PRINT '<option value="'.$let.'">'.$word.'</option>';
}
PRINT '</select>';
?>