Blogger Information
Blog 49
fans 0
comment 4
visits 41749
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
创建一个html页面,将其中的数据,用php变量替换并显示出来
过儿的博客
Original
899 people have browsed it
实例
<?php

   $title = "人名单";

  $name1 = "王二";

  $age1 = 29;

  $name2 = "孙七";

  $age2 = 30;

?>

<!DOCTYPE html>

    <html lang="en">

<head>

    <meta charset="utf-8">

    <title><?php echo $title; ?></title>

</head>

<body>

<table border="1">

    <tr><td>姓名</td><td>性别</td><td>年龄</td></tr>

    <tr><td><?php echo $name1; ?></td><td>男</td><td><?php echo $age1; ?></td></tr>

    <tr><td><?php echo $name2; ?></td><td>女</td><td><?php echo $age2; ?></td></tr>

</table>

</body>

</html>

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

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