I have a set of arrays that looks like this:
$array[1][1]==int
$array[1][2]=="a string"
$array[1][3]=="a string"
$array[2][1]==int
$array[2][2]=="a string"
$array[2][3]=="a string"
$array[3][1]==int
$array[3][2]=="a string"
$array[3][3]=="a string"
$array[4][1]==int
$array[4][2]=="a string"
$array[4][3]=="a string"
$array[5][1]==int
$array[5][2]=="a string"
$array[5][3]=="a string"
and so on until the first dimension reaches 10000. I'm trying to sort $array by int so that $array[1][1] is greater than $array[2][1]. I don't want the strings compared at all; they must stay attached to their int. For example:
$array[1][1]==5052
$array[1][2]=="this is a string attached to 5052!"
$array[1][3]=="this is another string attached to 5052!"
$array[2][1]==1000
$array[2][2]=="this is a string attached to 1000!"
$array[2][3]=="this is another string attached to 1000!"
$array[3][1]==10500
$array[3][2]=="this is a string attached to 10500!"
$array[3][3]=="this is another string attached to 10500!"
$array[4][1]==2000
$array[4][2]=="this is a string attached to 2000!"
$array[4][3]=="this is another string attached to 2000!"
$array[5][1]==2101
$array[5][2]=="this is a string attached to 2101!"
$array[5][3]=="this is another string attached to 2101!"
would become...
$array[1][1]==10500
$array[1][2]=="this is a string attached to 10500!"
$array[1][3]=="this is another string attached to 10500!"
$array[2][1]==5052
$array[2][2]=="this is a string attached to 5052!"
$array[2][3]=="this is another string attached to 5052!"
$array[3][1]==2101
$array[3][2]=="this is a string attached to 2101!"
$array[3][3]=="this is another string attached to 2101!"
$array[4][1]==2000
$array[4][2]=="this is a string attached to 2000!"
$array[4][3]=="this is another string attached to 2000!"
$array[5][1]==1000
$array[5][2]=="this is a string attached to 1000!"
$array[5][3]=="this is another string attached to 1000!"
however I have no idea how to do this. I tried looking at array_multisort, but the article pretty much lost me. can anyone help?