1.使用双引号中插入单引号
echo "that's ok";
2.使用单引号加上转义字符\
echo 'that\'s ok';
3.使用eof输出一个h5文本
echo <<<EOF
<html><body>
that's ok
</body></html>
EOF;
?>
代码及输出结果如下:
echo "that's ok";
echo 'that\'s ok';
echo <<<EOF
<html><body>
that's ok
</body></html>
EOF;
?>