我正在尝试调试这个聚合循环,我发现在第一种情况下完成“聚合”后,它会继续执行第二种情况“非聚合”。知道为什么会这样吗?
<?php
$agg = $_POST['agg'];
$m=0;
$j=0;
switch ($agg)
{
case 'Aggregated':
while ($m<=$i)
{
echo $bing_results[$m];
echo $Faroo[$m];
echo $Blekko[$m];
echo 'Results AGG: '.$m;
$m++;
}
case 'Non-Aggregated':
while ($m<=$i)
{
echo $Blekko[$m];
$m++;
echo 'Results NAG: '.$m;
}
$m=0;
while ($m<=$i)
{
echo $Faroo[$m];
$m++;
echo 'Results: NAG '.$m;
}
$m=0;
while ($m<=$i)
{
echo $bing_results[$m];
$m++;
echo 'Results: NAG '.$m;
}
case 'Bing':
while ($m<=$i)
{
echo $bing_results[$m];
$m++;
echo 'Results: Bi '.$m;
}
case 'Blekko':
while ($m<=$i)
{
echo $Blekko[$m];
$m++;
echo 'Results: BL '.$m;
}
case 'Faroo':
while ($m <=$i)
{
echo $Faroo[$m];
$m++;
echo 'Results: F '.$m;
}
}
?>