Blogger Information
Blog 14
fans 1
comment 0
visits 7378
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php的变量定义以及字符串的变量分析及应用--2018年8月21日作业
百度郝郝的博客
Original
766 people have browsed it

代码:


实例

<?php

$name1 = '小明';
$name2 = '老师';

$echo1 = $name2.':'. '\''.$name1.',你将来想找一份什么样的工作?\'';
$echo2 = "{$name1}:\"钱多事少离家近!\"";


echo $echo1, '<br>', $echo2;
echo '<br>';
echo $itse = <<<HEREDOC
{$name2}:"那是怎样的一份工作呢?";
HEREDOC;

echo '<br>';

echo $its = <<< "HEREDOC"
{$name1}:"在小区门口摆个碗,月收入过万!"; 
HEREDOC;

echo '<br>';

echo <<<NOWDOC
$name2 :“滚出去。”
NOWDOC;

echo '<br>';

运行实例 »

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


运行图:

Y7CZT7KJ@LK(]7M0MJC%BYI.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