Blogger Information
Blog 14
fans 0
comment 0
visits 11935
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php入门 -1 2018年4月11日课程
JUNL的博客1111
Original
696 people have browsed it

实例

<?php
/医院
 * Created by PhpStorm.
 * User: karen
 * Date: 2018/4/12
 * Time: 19:25
 */
 echo'<h2  style="color:red">今天心情不好,工作生活都不开心</h2>';

运行实例 »

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

实例

<?php $name='peter zhu';
?>
<!doctype html>
<html lang="en">
<?php echo $name,'<hr>'; ?>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title><?php echo'如何实现php与html代码的混写';?></title>
</head>
<body>
<?php
echo '<a href="http://www.php.cn">PHP中文网</a>'
?>

</body>
</html>
<?php
echo'<hr>';
?>
<?php
echo '原来PHP是这么好玩';
?>

运行实例 »

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

实例

<?php
/医院
 * Created by PhpStorm.
 * User: karen
 * Date: 2018/4/12
 * Time: 19:43
 */
$name="朱老师";
    echo '<h2>www.php.cn</h2>',$name;
 print '<h2>PHP中文网</h2>';

运行实例 »

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

实例

<?php
/医院
 * Created by PhpStorm.
 * User: karen
 * Date: 2018/4/12
 * Time: 19:48
 */
$name ='peter zhu';
$Name ='peter wang';
echo $name, 'is ', $Name;
$sName='peter';
$iAge=30;
$siteName ='php 中文网';
$FileType='php';
echo $_SERVER['SCRIPT_FILENAME'];
echo $_SERVER['HTTP_USER_AGENT'];
  //  class.ClassName.extends.AnotherClass{
    //function_construct(argument)

运行实例 »

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

实例

<?php
/医院
 * Created by PhpStorm.
 * User: karen
 * Date: 2018/4/12
 * Time: 22:19
 */
$money='95亿元';
$siteName='华佗出诊';
$title1='阿里$money收购饿了吗';
$title2="阿里{$money}收购饿了吗";
echo $title1,$title2;
echo '郭德纲:\'你无耻的样子很有我当年的神韵\'';
echo '<hr>';
echo "郭德纲:\"你无耻的样子很有我当年的神韵\"";
echo '<hr color="red">';
//echo nl2br("天会下雨吗 \n 不会");
echo '<hr>';
echo $title2="阿里{\$money}收购饿了吗";
//heredoc,nowdoc
$heredoc=<<<HEREDOC
{$money}春说:" 春天美" 夏说"夏天美"\n
HEREDOC;
echo nl2br($heredoc);

$nowdoc=<<<'NOWDOC'
{$money}春说:" 春天美" 夏说"夏天美"\n
NOWDOC;
echo nl2br($nowdoc);
echo '<br>';
$heredoc=<<<HEREDOC
{$siteName}遇到曹操就是悲剧.\n
这是一个医者的悲剧.
HEREDOC;
echo nl2br($heredoc);

运行实例 »

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


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