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:
I think that you can do something like:
$codes = array('tn','us','fr');
$names = array('Tunisia','United States','France');
foreach ($codes as $key => $code) { echo '' . $names[$key] . ''; }
It should also work for associative arrays.