Created
May 24, 2014 17:07
-
-
Save JingwenTian/4a6270aae3f1169b5002 to your computer and use it in GitHub Desktop.
PHP二维数组转一位数组
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//一个很大的二维数组 | |
$arr = array( | |
0 => array( | |
'id'=>11, | |
'name'=>'name1' | |
), | |
1 => array( | |
'id'=>22, | |
'name'=>'name2' | |
), | |
2 => array( | |
'id'=>33, | |
'name'=>'name3' | |
) | |
); | |
//如何以最高的效率实现将上面的二维数组转为一位数组 | |
array( | |
0 => 11, | |
1 => 22, | |
2 => 33 | |
) |
DingK-R
commented
May 24, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment