you need put numbers for each row: count rows, put numbers, .....
first you need to make rows look like
1 => aaaa:aaaa:aaaa
2 => bbbb:bbbb:bbbb
after you process that array "testarray" ...
foreach ($testarray as $id => $your_data_in_rows)
then you can work with that array
example drop down menu SELECT CITY:
1 => "city1",
2 => "city2",
3 => "city3",
.......
$selectcity = "<select name=\"city\">";
foreach ($city as $id => $name)
$selectcity .= "<option value=\"$id\">$name</option>";
$selectcity .= "</select>";
print($selectcity);
but as is written .... you better use database!!!