我已经尝试分析它几个小时了,但我不明白我的代码出了什么问题:(
$d = 1; //I declare this variable as 1
$a = 0;
while($d<$arraycount-2){
while ($a < 40){
$c = 0;
$b = 0;
while($c < $fc){
$finaloutput = $finaloutput.$database_returned_data[$d][$c].","; //But here, in this loop $d is always 1
$c++;
}
while($b < 5){
$finaloutput = $finaloutput.$mydata[$a][$b].",";
$b++;
}
$finaloutput = $finaloutput."--END--";
$a++;
}
$d++; //But it increments successfully. Hence, the while loop terminates after it meets the criteria.
}
变量 $d 在另一个循环内始终为 1,但在循环外递增。注意while里面有一个while语句。有什么问题吗?
我正在使用$d
我的数组:
$finaloutput = $finaloutput.$database_returned_data[$d][$c].",";
我是一个菜鸟海报。随时询问更多详细信息:)