xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>PHP 数组遍历 实例 - 自学教程(runoops.com)</title>
</head>
<body>
$cars=array("Volvo","BMW","Toyota");
$arrlength=count($cars);
for($x=0;$x<$arrlength;$x++)
{
echo $cars[$x];
echo "<br />";
}
</body>
</html>