我在 PHP 中有这个数组,其中我在数组中有一个数组,其中包含名称和排名。我希望排名按顺序排列。即从1到16。
$info = array( array( "Name"=> "Ayush Mishra", "Rank"=> "1"),
array( "Name"=> "Ayush Mishra", "Rank"=> "16"),
array( "Name"=> "Ayush Mishra", "Rank"=> "14"),
array( "Name"=> "Ayush Mishra", "Rank"=> "15"),
array( "Name"=> "Ayush Mishra", "Rank"=> "13"),
array( "Name"=> "Ayush Mishra", "Rank"=> "12"),
array( "Name"=> "Ayush Mishra", "Rank"=> "11"),
array( "Name"=> "Ayush Mishra", "Rank"=> "10"),
array( "Name"=> "Ayush Mishra", "Rank"=> "8"),
array( "Name"=> "Ayush Mishra", "Rank"=> "9"),
array( "Name"=> "Ayush Mishra", "Rank"=> "7"),
array( "Name"=> "Ayush Mishra", "Rank"=> "5"),
array( "Name"=> "Ayush Mishra", "Rank"=> "4"),
array( "Name"=> "Ayush Mishra", "Rank"=> "3"),
array( "Name"=> "Ayush Mishra", "Rank"=> "6"),
array( "Name"=> "Ayush Mishra", "Rank"=> "2"), );
我想要上面数组中的这个数组。这是我想要得到的结果数组。
$result = array(
array( "Name"=> "Ayush Mishra", "Rank"=> "1"),
array( "Name"=> "Teaser", "Rank"=> "2"),
array( "Name"=> "Pussel", "Rank"=> "3"),
array( "Name"=> "Condomso", "Rank"=> "4"),
array( "Name"=> "Branite", "Rank"=> "5"),
array( "Name"=> "Biknol", "Rank"=> "6"),
array( "Name"=> "Fuckita", "Rank"=> "7"),
array( "Name"=> "James", "Rank"=> "8"),
array( "Name"=> "Babita", "Rank"=> "9"),
array( "Name"=> "Mathse", "Rank"=> "10"),
array( "Name"=> "rohan", "Rank"=> "11"),
array( "Name"=> "Alex", "Rank"=> "12"),
array( "Name"=> "Peter", "Rank"=> "13"),
array( "Name"=> "Gabbar Singh", "Rank"=> "14"),
array( "Name"=> "raghav", "Rank"=> "15"),
array( "Name"=> "Shivam", "Rank"=> "16"),
);
我想要上面的数组作为 $info 的结果。请给我代码以使 $info 更改为 $result。