">
当前位置:Gxlcms > PHP教程 > php数组转换(一维数组转二维数组)

php数组转换(一维数组转二维数组)

时间:2021-07-01 10:21:17 帮助过:66人阅读

  1. $asr[1] = array("a","b","c","d");
  2. $asr[2] = array("a","b","c","d");
  3. $asr[3] = array("a","b","c","d");
  4. $newarray = array();
  5. foreach($asr as $a)
  6. {
  7. $newarray[] = $a;
  8. }
  9. print_r($newarray);
  10. ?>

人气教程排行