sw9 Posted August 13, 2009 Share Posted August 13, 2009 i have an array that looks like this: Array ( [0] => Array ( [Webcast] => 1250251200 ) [1] => Array ( [Ch16 North] => 1250251200 ) [2] => Array ( [Ch16 South] => 1250251200 ) [3] => Array ( [Webcast] => 1250290800 ) [4] => Array ( [Ch16 South] => 1250290800 ) ) I want to resort the array so that it groups by timestamp, so it would be something like this: Array ( [0] => Array ( [1250251200] => 'Webcast', 'Ch16 North', Ch16 South' ) [1] => Array ( [1250290800] => 'Webcast', 'Ch16 South' ) ) i am getting confused on if there is actually an existing sort function i can use to do this or if i have to loop through to mix them. can anyone help me find the most efficient way on this? thanks so much in advance. Link to comment https://forums.phpfreaks.com/topic/170121-how-to-group-my-arrays/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.