Blogger Information
Blog 5
fans 0
comment 0
visits 3100
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php变量的进阶知识与实践-2018年8月23日12:40
牛牛的博客
Original
546 people have browsed it
  1. 问答题: 什么是变量的作用域?

变量的作用域是指变量作用的范围,变量的作用域包括全局、局部、静态三种。

2. 编程: 变量的类型与检测

实例

<?php
$val=123.45;
echo gettype($val);
?>

运行实例 »

点击 "运行实例" 按钮查看在线实例

3. 编程: 分支结构的实例

实例

<?php
$level='A';
switch ($level){
case 'A':
echo '您的等级为'."$level".'级';
break;

case 'B':
echo '您的等级为'."$level".'级';
break;

case 'C':
echo '您的等级为'."$level".'级';
break;

default:
echo '您的等级为D级';
break;
}
?>

运行实例 »

点击 "运行实例" 按钮查看在线实例


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