Blogger Information
Blog 43
fans 0
comment 0
visits 30445
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php遍历数组与js遍历数组的区别
橙絮圆
Original
499 people have browsed it

php遍历数组与js遍历数组的区别

作业内容:请实例演绎php遍历数组与js遍历数组的区别


  • php遍历数组与js遍历数组的区别

    1. <?php
    2. $arrs=['宝马700i','野马800','奔驰大G'];
    3. ?>
    4. <!DOCTYPE html>
    5. <html lang="en">
    6. <head>
    7. <meta charset="UTF-8">
    8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    9. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    10. <title>Document</title>
    11. </head>
    12. <body>
    13. <ul>
    14. <?php foreach($arrs as $arr): ?>
    15. <li><a href=""><?=$arr?></a></li>
    16. <?php endforeach; ?>
    17. </ul>
    18. <script>
    19. let arrs=['宝马700i','野马800','奔驰大G']
    20. arrs.forEach(alert);
    21. </script>
    22. </body>
    23. </html>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post