html標籤直接顯示(使用)php變量的值;

1.在html標籤中可以直接使用php變量的值的方法如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<!--<body background="images/b1.jpg">-->
<?php $shishi="nidaye";?>
<table border="true">
    <tr>
        <td><?=$shishi ?></td>
        <td>buzhikexingbu</td>
    </tr>
</table>
<input type="button" value="<?=$shishi?>">
</body>
</html>

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章