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 the simplest way is just to use the for loop this way:
$codes = array('tn','us','fr'); $names = array('Tunisia','United States','France'); for($i = 0; $i < sizeof($codes); $i++){ echo '' . $names[$i] . ''; }