Correction status:Uncorrected
Teacher's comments:
<?php
/**
* 定界符:单引号
*
*/
$money = '95亿美元';
$title2 = "阿里{$money}收购了饿了么";
echo $title2;
//特殊字符:如何在字符串中输出定界符? 转义:\
echo '<br>';
echo '郭德纲:\'你无耻的样子很有我当年的神韵 \' ';
//特殊字符: \n
echo '<hr>';
echo "明天会下雨吗? \n 不会的";
//HEREDOC
$siteName = 'www.cfdacx.com';
$heredoc = <<< HEREDOC
{$siteName} 致力于一站式溯源解决方案,"食品安全是重中之重"! \n
这是未来的趋势
HEREDOC;
echo nl2br($heredoc);
/*
*NOWDOC
*php5.3以上支持 : nowdoc
*/
$nowdoc = <<< 'NOWDOC'
<h2>$siteName</h2> \r\n 'www.php.cn'
NOWDOC;
echo $nowdoc;