Printing associative array

Hi Dave and pawan, how to print if key and array value are both strings.

string array[string]

foreach(array[key]) $display("key: %s value: %s", key, array[key]); 

will this work?