As laserligt points out, your code should work quite nicely albeit I might think you've laid out your code a bit awkward.
When working with arrays you could eg. write it like so :
$data[0][0] = "first"
$data[0][1] = "second"
$data[1][0] = "third"
$data[1][1] = "fourth"
$data[2][0] = "fifth"
Even this would work :
$users[1][name] = "Techek"
$users[1][age] = 29
$users[2][name] = "PNXI"
... and with a little use of WHILE you'd easily loop through those two dimensional arrays. And ofcourse there's nothing stopping you ( except for memory! ) if you'd like to create a 13-dimensional array, like mine :
$universe[galaxy][star][planet][continent][country][city][street][house][creature][bodypart][cell][dna][atom]
Except it might prove a little overkill!?