Sorting MultiDimensional Arrays? Based on sorting 1 array
Posted: Tue Dec 22, 2009 2:59 pm
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
I have a multidimensional array (2D) that i am trying to sort..
is there a way to sort array idNumber and then based on the changes made in that array apply it to the other arrays? example
///////UNSORTED
$blackhole idNumber = 2 4 1 3 5
$blackhole title = 'Had' 'Little' 'Mary' 'A' 'Lamb'
//////SORTED
$blackhole idNumber = 1 2 3 4 5
$blackhole title = Mary Had A Little Lamb
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:
Posting Code in the Forums to learn how to do it too.
I have a multidimensional array (2D) that i am trying to sort..
Code: Select all
$blackhole = array(
'idNumber'=>array(),
'title'=>array()
);///////UNSORTED
$blackhole idNumber = 2 4 1 3 5
$blackhole title = 'Had' 'Little' 'Mary' 'A' 'Lamb'
//////SORTED
$blackhole idNumber = 1 2 3 4 5
$blackhole title = Mary Had A Little Lamb
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: