Well, I don't understand this thread. First of all:
Code:
$ set -A array "one two three four"
$ echo ${array[0]}
one two three four
$
so the command given in the OP results in an array with a single element. To replicate that behavior:
Code:
$ string="one two three four"
$ set -A array "$string"
$ echo ${array[0]}
one two three four
$
but if you want to split it into separate array elements do:
Code:
$ string="one two three four"
$ set -A array $string
$ echo ${array[0]}
one
$
if this is not working for you, you probably have IFS set wrong:
Code:
$ IFS=""
$ string="one two three four"
$ set -A array $string
$ echo ${array[0]}
one two three four
$