PHP Embedding HTML And PHP

翟俊名
2023-12-01

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

 类似资料:

相关阅读

相关文章

相关问答