Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
作业内容:请实例演绎php遍历数组与js遍历数组的区别
php遍历数组与js遍历数组的区别
<?php
$arrs=['宝马700i','野马800','奔驰大G'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<ul>
<?php foreach($arrs as $arr): ?>
<li><a href=""><?=$arr?></a></li>
<?php endforeach; ?>
</ul>
<script>
let arrs=['宝马700i','野马800','奔驰大G']
arrs.forEach(alert);
</script>
</body>
</html>