3 ms·
> $a = "foo"; $a[0][0] It makes sense when you think of it in offsets. $string[offset] means that given $a = 'foo' then $a[0] is f and given $a = 'f' then $a[0
by mfjordvald 15y ago
> $a = "foo"; $a[0][0]
It makes sense when you think of it in offsets. $string[offset] means that given $a = 'foo' then $a[0] is f and given $a = 'f' then $a[0] is f. Thus $a[0][0] would be the first offset of the first offset of "foo". $a[0][1] would not be valid, of course.
Also it's not really something you should ever use, but it's definitely more consistent than throwing an error.