passing line into array

I am doing a shell script in ksh. I have an output from grep that goes something like this:

wordIWasLookingFor
anotherWordIWasLookingFor
yetAnotherWordIWasLookingFor

I want to toss each line into an array such that:

myArray[0] = wordIWasLookingFor
myArray[1] = anotherWordIWasLookingFor
myArray[2] = yetAnotherWordIWasLookingFor

Can anyone tell me how to do this? I was thinking along the lines of:

myArray[]=`grep LookingFor myFile.txt`

This didn't work though.

Thanks for all answers in advance.

and input ? Example ?
only word/line or ?

If one word / line then

a=( $(grep -i "string" words.txt ) )
echo ${#a[*]}
echo ${a[*]} 

this has been answered by vgersh99

http://www.unix.com/unix-dummies-questions-answers/20116-assigning-values-array.html

set -A array $(grep "string" myFile.txt )
and
array=( $(grep "string" myFile.txt ) )
can't handle those lines correct which include more words as one.
If you need put the line to the one array element, then you need some input manipulation = line is one element.

Example, works with posix-sh (ksh, bash, ...):

i=0
array[0]=""

toarr()
{
   array[$i]="$*"
   ((i+=1))
}

grep "string" myFile.txt | while read line
do
     toarr $line
done
echo ${#array[*]}
echo ${array[*]}

i=0
cnt=${#array[*]}
while ((i<cnt))
do
        echo "$i:${array[$i]}"
        ((i+=1))
done