我有一个看起来像这样的数组:
Array(
['some_first_category'] => Array(
['some_first_name'] => Array(
[0]=>'first@email.com',
[1]=>'second@email.com',
[2]=>'third@email.com',
[3]=>'fourth@email.com' )
['some_second_name'] => Array (
[1]=>'first@email.com',
[2]=>'second@email.com')
['some_third_name'] => Array(
[1]=>'first@email.com',
[2]=>'second@email.com',
[3]=>'third@email.com',
[4]=>'fourth@email.com' )
['some_second_category'] => Array(
['some_first_name'] => Array(
[0]=>'first@email.com' )
['some_second_name'] => Array(
[1]=>'first@email.com',
[2]=>'second@email.com',
[3]=>'third@email.com',
[4]=>'fourth@email.com')
['some_third_name'] => Array(
[1]=>'first@email.com',
[2]=>'second@email.com'))
我想按具有名称的值的数量对数组进行排序,在我的情况下,我想成为这个数组:
Array(
['some_first_category'] => Array(
['some_third_name'] => Array(
[1]=>'first@email.com',
[2]=>'second@email.com',
[3]=>'third@email.com',
[4]=>'fourth@email.com' )
['some_first_name'] => Array(
[0]=>'first@email.com',
[1]=>'second@email.com',
[2]=>'third@email.com',
[3]=>'fourth@email.com' )
['some_second_name'] => Array (
[1]=>'first@email.com',
[2]=>'second@email.com')
['some_second_category'] => Array(
['some_second_name'] => Array(
[1]=>'first@email.com',
[2]=>'second@email.com',
[3]=>'third@email.com',
[4]=>'fourth@email.com')
['some_third_name'] => Array(
[1]=>'first@email.com',
[2]=>'second@email.com')
['some_first_name'] => Array(
[0]=>'first@email.com' ))
这意味着按名称值的数量(计数)按名称对类别进行排序。有人可以帮助我吗?提前致谢,
亚伦