Hi,
I need to rename an array with non-consecutive keys with consecutive keys starting at 0
like
testarray[0]['name'] = 'somename0';
testarray[0][1] = value01;
testarray[0][12] = value012;
testarray[0][16] = value016;
testarray[0][20] = value020;
testarray[5]['name'] = 'somename5';
testarray[5][0] = value50;
testarray[5][1] = value51;
testarray[5][6] = value56;
testarray[5][20] = value520;
testarray[9]['name'] = 'somename9';
testarray[9][3] = value93;
testarray[9][4] = value94;
testarray[9][45] = value945;
testarray[9][56] = value956;
would become
testarray[0]['name'] = 'somename0';
testarray[0][1] = value01;
testarray[0][12] = value012;
testarray[0][16] = value016;
testarray[0][20] = value020;
testarray[1]['name'] = 'somename5';
testarray[1][0] = value50;
testarray[1][1] = value51;
testarray[1][6] = value56;
testarray[1][20] = value520;
testarray[2]['name'] = 'somename9';
testarray[2][3] = value93;
testarray[2][4] = value94;
testarray[2][45] = value945;
testarray[2][56] = value956;
so basically i just need to rename the first dimension of an array, the second dim and value should not change. Is there an easy way to do this?
Thanks,
Chuck