Problem when assign the array with the string index

I come across the problems when assigning the array in the script below . How to use the array with the 'string index' correctly ? When I assign a new string index , the array elements that are previously assigned are all changed .:eek::eek::eek:

$ array[aa]=211
$ echo ${array[aa]}
211

$ array[bb]=333
$ echo ${array[bb]}
333

$ echo ${array[aa]}
333
$ array[cc]=999
echo ${array[cc]}
999
$ echo ${array[bb]}
999
$ echo ${array[aa]}
999

Use typeset -A

I try typeset -a array , but the problems seems to be exist:confused::confused:

$ typeset -a array
$ array[aa]=123
$ array[bb]=345
$ echo ${array[bb]}
345
$ echo ${array[aa]}
345

I am using the following bash version

$ bash -version
GNU bash, version 3.00.15(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2004 Free Software Foundation, Inc.

From Bash's man page

It works for zsh; but fior ksh and bash, indexes must be integers.