我一直在努力,現在來分析它像幾個小時,但我不明白什麼是錯我的代碼:(變量不改變其值
$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語句是有什麼錯
我使用$d
我的數組:?
$finaloutput = $finaloutput.$database_returned_data[$d][$c].",";
我是noob海報。隨意問更多細節:)
什麼是$ arrayCount的價值? $ fc的價值是多少? –
你不會在''while'範圍內增加'$ d' ....?什麼是'$ arraycount-2'? –
缺少內部循環之後的$ $重置,'$ a = 0'之間爲 – cske