pghsteelers
Technical User
Is is possible to pass a string in a function and have it return an array?
Example, I would like to capture a variable to a string and pass that string to a function which converts the string into an array and passes it back as an array.
The only way I am seeing that as possible, but having trouble doing, is to call the function to convert the string to an array inside of a separate function call that is setup to perform some task on the array. Therefore it will be passed to the final function as an array.
Any suggestions?
Note = I am trying to avoid having to put the string to array part of the code in the body, but actually have it as a separate function. Or maybe there is a way to pass that array back to the body of the script that isn't through the function?
Example, I would like to capture a variable to a string and pass that string to a function which converts the string into an array and passes it back as an array.
The only way I am seeing that as possible, but having trouble doing, is to call the function to convert the string to an array inside of a separate function call that is setup to perform some task on the array. Therefore it will be passed to the final function as an array.
Any suggestions?
Note = I am trying to avoid having to put the string to array part of the code in the body, but actually have it as a separate function. Or maybe there is a way to pass that array back to the body of the script that isn't through the function?