The value of $a is: hello
The value of $hello is: Hello Everyone.
The value of $$a is: Hello Everyone.
That works like this $($a) = $hello = Hello Everyone.

Question:

Does $$var[1] mean:

  1. Get the value of the element at position 1 then evaluate dynamically?
  2. Evaluate dynamically and then get the element at position 1?

Answer

Use curly braces—{ }—to make it clear.

  1. ${$var[1]}
  2. ${$var}[1]