php中foreach循环问题
我按着书本的例子,可是运行的时候提示错误
$arr = array("CRONALDO", "KAKA", "OZIL");
foreach($arr as $value)
{
each "Value: " . $value . "
";
}
提示这行 each "Value: " . $value . "
"; 出错,是什么原因呢?怎样才能正确输出
------解决方案--------------------echo啊,低级错误
------解决方案--------------------<br />
each "Value: " . $value . "<br>";//each换成echo<br />
로그인 후 복사
------解决方案--------------------代码改成:
$arr = array("CRONALDO", "KAKA", "OZIL");
foreach($arr as $value)
{
echo "Value: " . $value . "
";
}