Making a set of buttons from an Array

Hi guys,

Having done some thorough research on the subject, I cannot work out how to create a set of buttons from an array or list. Here is my code that I have written to, upon clicking a GUI button, create a separate set of buttons with names taken from the array. This however has no effect in my game.

            private void OnGUI(){
            
            				
            if (some_bool_to_show_gui) {
    
            GUI.Box(new Rect(10,10,100,90), "Do Things");
    
               if (GUI.Button (new Rect (15, 15, 100, 50), "Do Something")) {					   
               DoSomething (); //This Works
                }

               if (GUI.Button (new Rect (15, 60, 100, 50), "Do Something Else")) {
                   for (int i = 0; i < SomeArrayofStrings.Length; i++) {
                   if(GUI.Button (new Rect (15, 60+15*i, 100, 50),SomeArrayofStrings*)) {*

*DoSomethingElse(); *
*} *
}
}
}
}

If anyone can elucidate me in this matter I would really appreciate it!
Cheers,
Popuppirate

The typical way woul be to loop through the list with for or for each. Create your GUI.Button inside the loop.

Edit: Code added

Just a couple of changes to your code, as commented

bool showmenu = false; // Moved outside the method to class scope

void OnGUI(){
    if (GUI_use) {

        GUI.Box (new Rect (10, 10, 100, 90), "Drone Control");
        Player_Stats playerstats = this.transform.GetComponent<Player_Stats> ();

        if (GUI.Button (new Rect (15, 15, 100, 50), "Build")) {
            BuildDrone ();
        }

        if (GUI.Button (new Rect (15, 100, 100, 50), "Current Drones")) {
            showmenu = true; //or showmenu = !showmenu;
        } // Moved bracket

        if (showmenu) {
            for (int i=0; i<drone_type.Length; i++) {
                if (GUI.Button (new Rect (15, 15 * i, 100, 50), drone_type *)) {*

// Do stuff
}
}
}
}
}
Edit: [Here is a link to my YouTube video showing how to do this in the Unity 4.6 UI][1]
[1]: Unity UI dynamic drop down menu - YouTube