[Solved] error “declare: -A: invalid option” on associative arrays

associative arrays came on version 4

Make sure the version of bash being invoked as an interpreter at the top of your shell script (#!/bin/bash or whatever) is also version 4. If you’re doing:

bash --version