converting an array to a string...

Is there an easy way to convert an array to a string? I am wanting to convert and array like {"This", "is", "an", "array"} to "This is an array". This would be similar to the str() or val() or recordtostring() functions but would work on an array.

I am sure it can be done with a a loop and a few strrep() statements but if there is a simplier way...
Parents
  • I'm not immediately aware of any single function to accomplish that so either looping or a couple functions together might be your best option, especially since you want to insert spaces between some array elements.

    Maybe do three steps rather than a loop:
    1. Convert array to string -- str()
    2. Clip off the {" and "} -- strclpl() and strclpr()
    3. Replace all ", " with " " -- strrep()
Reply
  • I'm not immediately aware of any single function to accomplish that so either looping or a couple functions together might be your best option, especially since you want to insert spaces between some array elements.

    Maybe do three steps rather than a loop:
    1. Convert array to string -- str()
    2. Clip off the {" and "} -- strclpl() and strclpr()
    3. Replace all ", " with " " -- strrep()
Children
No Data