Blogger Information
Blog 32
fans 0
comment 0
visits 21450
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
4月11日定界符的用法
inhylei
Original
690 people have browsed it

定界符的用法

<?php

//单引号不解析变量,双引号解析变量或特殊字符;
// 
$time = '2018-04-11';
echo $time;
echo '<hr>';
echo '我在"php中文网"学习';

echo '<hr>';

echo "我在\"php中文网\"学习";
echo "今天的日期{$time} ";

echo '<br>';
echo "今天的日期{\$time} ";

echo '<hr>';
$heredoc = <<<"HEREDOC"
i am learning php;
HEREDOC;
echo $heredoc;

echo '<hr>';

$nodoc = <<<'NODOC'
我在“中文网”学习PHP技术 \r \n
非常开心;
NODOC;
echo $nodoc;

echo '<hr>';

echo 'php中的转义字符是: \\ '; 
echo '<br>';
echo "心永远微笑向暖,只有面对\"微笑\"每天的日子才保鲜。";

echo ' 生活,不是件简单的事, 没有太多的一帆风顺,也没有太多的心想事成,有的,只是些随时可能的"碰壁"....

  或许,倾心已久的人就在你举目可见的地方,却不一定是在等你;

  或许,付出\n努力和艰苦后,你的钞票并不会乖乖地躲进你的腰包里;'


?>


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