0
我有了这个周期:处理多维数组 - PHP
$diffe = $differenz*7;
$diff = 0;
$n = 0;
$an = $anzahl-1;
$z = 0;
$plus = $periode;
$oarray = array();
$sarray = array();
$parray = array();
$h = 0;
while ($n < $ortcount) {
foreach ($ortearray as $o) {
$oarray[] = $o;
}
$sarray[] = get_start_dates($star, $diff, $wochearray);
$diff += $diffe;
while ($h < $ortcount) {
$helpingstring= join(";",$sarray[$h]);
echo $h;
$sarrayhelp = explode(";", $helpingstring);
while ($z < $an) {
foreach ($sarrayhelp as $s) {
$parray[] = plustime($s, $plus);
}
$plus = $plus+$periode;
$z++;
}
$h++;
}
$n++;
}
和需要以下条件:
多维数组中的每个“子阵”,“$ sarray []”应该逐步被处理在 plustime()函数和结果应保存到“$粒子阵列[]”。
此时,只处理“$ sarray []”的第一个子数组。
任何帮助将grely赞赏。 请帮忙!
我认为第一步是你学习如何正确地缩进代码。 – hakre