Join function to add all elements of an array to create string variable in ASPWe can create a string by joining all the elements of an array by using join() function. The out put of this function is a string variable. Here is the syntax of using join() function.
Here My_Array is the array and the My_String is the string variable which gets the string which is returned by join function after adding all the elements of the My_Array array.
While joining by default one blank space is used as delimiter, we can specify any delimiter while joining the elements by using join function. Here is the syntax of this.
This way we can have any delimiter added between the elements while generating the string variable. In the above example comma ( , ) is used.
Here is the complete code for joining elements and creating a string variable.
Same way we can create array by breaking string using split function
This article is written by plus2net.com team.
Be the first to post comment on this article : |