二維陣列 two-dimensional array
C
int a[2][3]={{1, 2}, {3, 4}, {5, 6}}
printf("%d", a[0][1]);
javascript
var a=[[1,2],[3,4],[5,6]];
console.log(a[0][1]);
PHP
$a=array(array(1, 2), array(3, 4));
echo $a[0][1];
Lua
a={1,2,3}
b={"abc", "def", "ghi"}
print(a[1])
print(b[2])
Python
a=[[1,2,4],[4,5,6],[7,8,9]]
print(a[0][1])
bash
declare -A a
a[0,0]=1
a[0,1]=2
a[0,2]=3
a[1,0]=4
a[1,1]=5
a[1,2]=6
a[2,0]=7
a[2,1]=8
a[2,2]=9
echo ${a[0,1]}