vadim88 Posted September 28, 2008 Share Posted September 28, 2008 Let's say i have the following: 1 = 0 33 = 0.14 54 = 0.155 23 = 0.14 432 = 0 how can i make those to sort inside an array that at the end i will have an array that looks like this: array ( [0] => array('rate' => 0.14, 'count' => 2, 'pids' => array([0] => 23, [1] => 33)) [1] => array('rate' => 0, 'count' => 2, 'pids' => array([0] => 1, [1] => 432)) [2] => array('rate' => 0.155, 'count' => 1, 'pids' => array([0] => 54) ) Any help will be appreciated. Link to comment https://forums.phpfreaks.com/topic/126152-array-grouping/ Share on other sites More sharing options...
php.ajax.coder Posted September 28, 2008 Share Posted September 28, 2008 make it clear what you want to do Link to comment https://forums.phpfreaks.com/topic/126152-array-grouping/#findComment-652298 Share on other sites More sharing options...
vadim88 Posted September 28, 2008 Author Share Posted September 28, 2008 i think i wrote it as clear as possible. Link to comment https://forums.phpfreaks.com/topic/126152-array-grouping/#findComment-652306 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.