当前位置:网站首页>"PHP Basics" PHP statements and statement blocks
"PHP Basics" PHP statements and statement blocks
2022-07-27 08:06:00 【Go home at night】
Functional requirements
stay PHP Used in program “{” and “}” take PHP Statements are contained in a statement block
The sample code
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PHP Use of statement blocks </title>
</head>
<body>
<?php
{
echo 'Hello World!';
echo '<br />';
echo 'Hi, PHP';
}
?>
</body>Running results
The code analysis
{
echo 'Hello World!';
echo '<br />';
echo 'Hi, PHP';
}: from “{” and “}” A statement enclosed is a statement block , As a whole . This statement block contains three echo sentence , Output string respectively “Hello World!”、 character string “<br />” Represents line breaks and strings “Hi, PHP”
Knowledge description
PHP The program consists of one or more PHP Sentence structure , Each sentence is marked with a semicolon “;” end . Writing PHP Code , One PHP Statements usually occupy one line .
If more than one PHP There is some connection between sentences , have access to “{” and “}” Will these PHP Statements are included to form a statement block .
Be careful : Statement blocks are generally not used alone . Only and conditional judgment statements 、 Loop statement 、 Functions, etc , Statement blocks are meaningful only when they represent a whole .
边栏推荐
- Grandson's questions are difficult, and his son's invigilation is strict. I can't do it. Pay back my school money
- 如何更新pip3?和Running pip as the ‘root‘ user can result in broken permissions and conflicting behaviour
- Shenzhi Kalan Temple
- Dasctf2022.07 enabling game password WP
- Lua有状态迭代器
- 3D laser slam: Interpretation of logo-loam paper --- Abstract
- 代码接口自动化的有点
- Harbor正确密码登录不上去
- Can Linux install sqlserver
- The dragon lizard exhibition area plays a new trick this time. Let's see whose DNA moved?
猜你喜欢

Gossip: it's really important to have a rod in your hand and a net on your shoulder. As for how many fish are in the basket?
![[applet] how to get wechat applet code upload key?](/img/b4/76e2f12269601c0a969a709ff8a397.png)
[applet] how to get wechat applet code upload key?

Digital transformation driven by enterprise architecture!

Day111.尚医通:集成NUXT框架、前台页面首页数据、医院详情页

C event usage case subscription event+=

10000 word parsing MySQL index principle -- InnoDB index structure and reading

虚拟机克隆

将对象转换为键值对

"Intermediate and advanced test questions": what is the implementation principle of mvcc?

一段平平无奇的秋招经历
随机推荐
idea远程调试
Dormitory access control system made by imitating the boss (III)
Shell Scripts相关
C language: random number + Hill sort
You may need an additional loader to handle the result of these loaders.
How to analyze and locate problems in 60 seconds?
opengauss从库停掉,发现主库无法写入数据
Do me a favor ~ don't pay attention, don't log in, a questionnaire in less than a minute
【飞控开发基础教程4】疯壳·开源编队无人机-串口(光流数据获取)
ERP生产作业控制 华夏
将对象转换为键值对
实用的新药研发项目管理平台
Methods of server network testing
Sword finger offer 58 - I. flip word order
Record a PG master-slave setup and data synchronization performance test process
npm的使用
[flight control development foundation tutorial 4] crazy shell · open source formation UAV - serial port (optical flow data acquisition)
Internet of things industrial UART serial port to WiFi to wired network port to Ethernet Gateway WiFi module selection
【目标检测】YOLOv6理论解读+实践测试VisDrone数据集
SQL labs SQL injection platform - level 1 less-1 get - error based - Single Quotes - string (get single quote character injection based on errors)