php遍历输出数组的方法
实例一:
$list = array("A", "B", "C", "D", "E"); print "n"; foreach ($list as $value){ print " $valuen"; } // end foreach print "n"; ?>
实例二
$letters[0] = 'A'; $letters[1] = 'B'; $letters[3] = 'D'; $letters[2] = 'C'; foreach ($letters as $letter) { print $letter; } ?>