Blogger Information
Blog 16
fans 0
comment 0
visits 10630
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php基本语法字符串-2018年8月22日
兔子的博客
Original
581 people have browsed it

基本的语法

实例

<?php
$HE="hello world \n";
$SE="233";
echo "$HE,$SE";//双引号能解析变量名称
echo '$HE';//单引号只能是字符串
//HEREDOC相当于双引号
//nowdoc相当于单引号解析字符串
echo <<< "HEREDOC"
{$HE}
HEREDOC;
echo <<< 'NOWDOC'
{$HE}
NOWDOC;
?>

运行实例 »

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

注意空格 有些地方不能写注释 会影响代码

8.22.png

Correction status:qualified

Teacher's comments:注意:heredoc和nowdoc跟前面的<<<中间不要留空格!
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!