Blogger Information
Blog 21
fans 0
comment 0
visits 12345
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0412日————字符串的基本了解 12时23分
许增颜
Original
503 people have browsed it

代码如下:

实例

<?php
echo '黄业广:\'大憨华是傻子的事90%的广东人都知道了\'';
echo "<hr>";
echo "大憨华:\"人就是要傻点才可爱\"";
echo "<hr>";
echo '将大憨华送进精神病院病情会好转些吗? \n 不会的';
echo "<hr>";
// // 单引号特殊字符转义
echo "将大憨华送进精神病院病情会好转些吗? \n 不会的";
echo "<hr>";
// // 双引号特殊字符转义
echo nl2br("将大憨华送进精神病院病情会好转些吗\n不会的,他已经傻到骨子里了");
echo"<hr>";
// // heredoc,nowdoc
// HEREDOC相等于双引号的作用
$titlename='大憨华';
$heredoc = <<< "HEREDOC"
{$titlename}力争全球第一傻,\n"三个坚持",坚决做杀货王、坚决做杀货王、坚决搞基;
HEREDOC;
echo nl2br($heredoc); 
echo "<hr>";
// NOWDOC相当于单引号
$titlename='黄业广';
$nowdoc = <<< 'NOWDOC'
{$titlename}力争全球第一骚,\n"三个坚持",坚决做备胎王、坚决做猥琐佬、坚决搞基;
NOWDOC;
echo nl2br($nowdoc);
?>

运行实例 »

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

效果图:

G4%3D{9AJX_@X2A{WW]1)TR.png

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