I want to generate a selectbox using two arrays, one containing the country codes and another containing the country names.
selectbox
This is an example:
Few arrays can also be iterated like this:
foreach($array1 as $key=>$val){ // Loop though one array $val2 = $array2[$key]; // Get the values from the other arrays $val3 = $array3[$key]; $result[] = array( //Save result in third array 'id' => $val, 'quant' => $val2, 'name' => $val3, ); }