考虑如下代码片段:define("STOP_AT", 1024);$result = array();/* 在此处填入代码 */{5$result[] = $idx;}print_r($result);?>标记处填入什么代码才能产生如下数组输出?Array{[0] => 1[1] => 2[2] => 4[3] => 8[4] => 16[5] => 32[6] => 64[7] => 128[8] => 256[9] => 512}
A. foreach($result as $key => $val)
B. while($idx *= 2)
C. for($idx = 1; $idx < STOP_AT; $idx *= 2)
D. for($idx *= 2; STOP_AT >= $idx; $idx = 0)