I'm just going to make some assumptions here; Since you said in the other post about this, that you tried my version with lambda expressions and that you always got the last button being called, my guess it that you are trying to somehow use the string from the loop in the listener. The issue you are having there is with **capturing the loop iterator instead of the value**.
Eg. if you are going to write it something like this:
foreach (string a in places)
{
GameObject go = (GameObject)Instantiate(buttons);
go.transform.parent = panel.transform;
go.transform.localScale = new Vector3(1, 1, 1);
Button b = go.GetComponent