当前位置: 首页>编程语言>正文

PHP Embedding HTML And PHP

html.php

<html>
<body>
<?php $color = $_GET['color']; ?>

<?php
$names = array('Tom','Bob','Jim');
foreach($names as $person){
?>

<b><font color="<?php echo $color; ?>">the name of the person is<?php echo $person; ?></font></b> <br>

<?php
}
?>

</body>
</html>


测试: http://localhost/html.php?color=blue


https://www.xamrdz.com/lan/54z1967379.html

相关文章: