I have a simple foreach loop as follows:
foreach ($d_38 as $value) {
echo "
<option value='".$value."'";
if ($results["q".$i]==$value) echo 'selected="selected"';
echo">".$value."</option>
";
}
I currently have the the information stored in an array called $d_38 this information is placed into the options of the drop down during the foreach loop.
That all works fine. However, I have a different language stored in $d_38_t that I want to show when the text of the option is shown, in the code above this is the third $value variable. So basically, the user sees the options in one language but the data is always stored in English in this case.
I've no idea how to put those two arrays together so I can use them in the foreach loop - can anyone offer any guidance please?
$d_38and$d_38_thas the same keys?