Blogger Information
Blog 20
fans 0
comment 0
visits 12296
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
作业标题:0802-php是什么及运行原理 编程作业
缘亦
Original
458 people have browsed it

作业

  1. <?php
  2. //定义数组
  3. $filename = ['QQ','PS','webchat'];
  4. ?>
  5. <ol>
  6. <!--开始遍历循环输出数组-->
  7. <?php foreach ($filename as $softname): ?>
  8. <li><?php echo $softname ?></li>
  9. <?php endforeach ?>
  10. </ol>

PS:PHP遍历数组是把数组的多个值通过FOREACH函数给遍历循环输出出来。
刚进班级,之前的JS还没有学习,所有只做了今天学的PHP中的遍历数组。

运行结果如下


课堂笔记

  1. php指令分隔符;
  2. 1、功能执行语句必须加指令分隔箱
  3. 2、结构定义语句
  4. for 遍历
  5. forEach(JS)
  6. foreach(php)
  7. PHP变量$美元符 =是赋值符号
  8. 1PHP变量的类型是由内容所决定
  9. 2、变量的命令要具有一定的意义
  10. 3、变量命名 多个单词使用驼峰法命名
  11. 输出方式
  12. var_dump();
  13. echo ();
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