2 Replies Latest reply on Aug 13, 2007 1:32 PM by Handycam

    Convert Array to Proper English?

    Handycam Level 1
      Here's my problem: I have a bunch of arrays ranging from 2 to 8 members. They look, of course, like this:

      "red,green,blue"

      but I need to wind up with a string of :

      "red, green, and blue"

      with a space after each comma and an "and" before the last member.

      Anyone have a good idea on how to do this programmatically, in a was that I could process any such array from 2 up to 8-10 members? I'm figuring some sort of loop, but my earliest attempts can get complex and I'm looking for simple.

      Thanks.