How to convert array to a string ?

I didn't write the program but I beleive its not as thats what the length is doing ?

I don't understand what you're saying - you don't use "length" in the code you posted

Just post your code.