问题描述
有人可以帮助我,告诉我哪里出了问题,因为下面的代码返回“数组到字符串转换”。
$bigarray = [range('a','z')];
for( $i=1; $i<=26; $i++) {
$copy = $bigarray[$i-1];
array_push($copy,array_shift($copy));
$bigarray[$i] = $copy;
echo "<td>$bigarray[$i]</td>";
}
注意:第15行的C:\ xampp \ htdocs \ LearnPHP \ Test 1.PHP中的数组到字符串的转换
解决方法
range('a','z') // returns [a,b,c,d,e,etc]
您要将一个数组放置在另一个数组中。