In the array below you can see that the order of 'listElemId' differs from the three first elements in the array. What I want is them to be in order (listElem 1,2,3). 'listElemPoints' should of course follow.
How can this be accomplished?
Thanks in advance!
$listArray {
[0] {
[0] {
["listElemId"] = 2 // <- should be 1
["listElemPoints"] = 1 }
[1] {
["listElemId"] = 3 // <- should be 2
["listElemPoints"] = 2 }
[2] {
["listElemId"] = 1 // <- should be 3
["listElemPoints"] = 3 }
}
[1] {
[0] {
["listElemId"] = 3 // <- should be 1
["listElemPoints"] = 1 }
[1] {
["listElemId"] = 2 // <- correct
["listElemPoints"] = 2 }
[2] {
["listElemId"] = 1 // <- should be 3
["listElemPoints"] = 3 }
}
[2] {
[0] {
["listElemId"] = 3 // <- should be 1
["listElemPoints"] = 1 }
[1] {
["listElemId"] = 1 // <- should be 2
["listElemPoints"] = 2 }
[2] {
["listElemId"] = 2 // <- should be 3
["listElemPoints"] = 3 }
}
}