Create an array with a dynamic variable and another array

Create an array with a dynamic variable and another array

Hi there


I have a loop that scoops up some regions(1) and lots of locations in that region(many and i want to push the region and it's locations to an array so effectively creating a 2 dimensional array 

structure will be lilke

all = array ( region_name => array ( "location 1","location 2" "location 3")) 

region_name and the locations will be generated in a loop and so i the result will be lots of region_names etc etc

I have been using array push but can only seem to get a one dimension array together

All.push( locationsArray );

And can not do something like  All[region_name].push( locationsArray ); as i get an error undefined.



How do i create this array please? Any help would be appreciated.

Cheers

Steve