bluetonic wrote:Why does $a2[1] produce Dog but $a2 doesn't product anything?
Why do you think $s2 exists?
bluetonic wrote:My real question is why does the integer key work but not the 'b'? How does it know what the '1' is referring to?
Look at a print_r of $a2:
$a2=array("Cat","Dog","Horse","Cow");
print_r($a2);
It should be clear that $a2, or more correctly, $a2['b'], does not exist. The print_r of the result of the array_combine is not relevant here.