我正在使用AdminLTE免費模板創建一個管理網站我有一個問題,從PHP中獲取一個變量從括號中打印到HTML頁面 我想要做類似這樣的:php中的變量html
<!DOCTYPE html>
<html>
<head >
<!-- rest of the page -->
<span class="info-box-text" name= "msg" >
\t \t \t <!-- I want to print x here inside the info box -->
\t \t \t \t <script> <?php echo $x ?> </script>
\t </span>
<!-- the function that has the output comes after it is called -->
<script>
<?php
do somthing to $x
$output_messege = "the result of something=".$x"."
?>
</script>
</head >
</html>
你得到的結果是什麼? PHP是否安裝? – mkaatman
您是否收到任何錯誤? –