Are you really passing a value to the function as "set=a"? Or are you going to be using the variable "set" in your function to hold the value that you are sending in to it (the values being a,b,c and so on)?
Also, you mention that you are getting the "a part in a for loop". Does this mean that the variables are stored in an array?
I can give you an answer based on the above two assumptions:
I'm actually want to pass the string "set=a", "set=b", "set=c", etc....to the function. The "set=" part always stays the same but a, b, c...etc. change which is the part I can't figure out how to deal with.