progman1010
Programmer
so an array var can be referenced several different ways. what is the purpose and does anyone know the current convention?
I used to use:
$array['keyname'] and within strings: "...{$array['keyname']}..."
but just recently I found that I could skip the quotes and make my life easier:
$array[keyname] and within strings: "...$array[keyname]..."
Why am i given the syntax option and is the first version just a legacy compatibility? I personally like the second way better....
I used to use:
$array['keyname'] and within strings: "...{$array['keyname']}..."
but just recently I found that I could skip the quotes and make my life easier:
$array[keyname] and within strings: "...$array[keyname]..."
Why am i given the syntax option and is the first version just a legacy compatibility? I personally like the second way better....