我有一个这样的数组,
array[0][0],[1][0],[2][0] 是问题,array[0][1],[1][1],[2][1] 是答案问题。
现在我想根据答案的数量对这个数组进行排序。
第一个问题只有一个答案,第二个问题有两个答案,第三个问题有三个答案。
排序后的数组应该按照该问题的答案数量降序排列。无论如何在sql中实现这一点?或者我们如何在php中排序?希望我的问题很清楚。先感谢您。
Array
(
[0] => Array
(
[0] => Array
(
[0] => 12
[1] => 110
[2] => Tom
[3] => Tom@gmail.com
[4] => Hello tom how are you?
[5] => 2013-01-03 14:54:07
)
[1] => Array
(
[0] => Array
(
[0] => 12
[1] => Yes i am fine.
[2] => Arun
[3] => arun@gmail.com
[4] => 2013-01-03 14:55:22
)
)
)
[1] => Array
(
[0] => Array
(
[0] => 12
[1] => 110
[2] => Tom
[3] => Tom@gmail.com
[4] => Hello tom how are you.
[5] => 2013-01-03 14:54:07
)
[1] => Array
(
[0] => Array
(
[0] => 12
[1] => Yes i am fine
[2] => Arun
[3] => arun@gmail.com
[4] => 2013-01-03 14:55:22
)
[1] => Array
(
[0] => 12
[1] => Yes i am fine
[2] => Arun
[3] => arun@gmail.com
[4] => 2013-01-03 14:55:22
)
)
)
[2] => Array
(
[0] => Array
(
[0] => 12
[1] => 110
[2] => Tom
[3] => Tom@gmail.com
[4] => Hello tom how are you.
[5] => 2013-01-03 14:54:07
)
[1] => Array
(
[0] => Array
(
[0] => 12
[1] => Yes i am fine
[2] => Arun
[3] => arun@gmail.com
[4] => 2013-01-03 14:55:22
)
[1] => Array
(
[0] => 12
[1] => Yes i am fine
[2] => Arun
[3] => arun@gmail.com
[4] => 2013-01-03 14:55:22
)
[2] => Array
(
[0] => 12
[1] => Yes i am fine
[2] => Arun
[3] => arun@gmail.com
[4] => 2013-01-03 14:55:22
)
)
)