Where item is the word item, for instance.
$array[item] $array['item']
They both work but which is proper to use? Will one not work with future/past versions of PHP that I haven't encountered?
$a[key] is bad style and will generate a notice if PHP is set to display those. this is because it uses an undefined constant (key) as a kay. if a constant is undefined, PHP assumes it to be what you typed, as a string. therefore [key] == ['key'] but for the wrong reason. also, what if someone adds a keyword/constant to PHP that was the same name as your undefined constant. so proper use is ['key'].
hth moon