Convert a text string in bash to array
Another method using read:
read -a array <<< $str
In order to convert the string to an array, say:
$ str="title1 title2 title3 title4 title5"
$ arr=( $str )
The shell would perform word splitting on spaces unless you quote the string.
In order to loop over the elements in the thus created array:
$ for i in "${arr[@]}"; do echo $i; done
title1
title2
title3
title4
title5