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:
You can use array_merge to combine two arrays and then iterate over them.
$array1 = array("foo" => "bar"); $array2 = array("hello" => "world"); $both_arrays = array_merge((array)$array1, (array)$array2); print_r($both_arrays);