我有一個php noob時刻,即時尋找一個更小的更緊湊的解決方案來連接「$ content」變量,它被作爲外部「佈局中的主要內容.php「文件。php變量賦值來顯示html和php變量
<?php
require_once("Controller/comment_control.php");
$comment = new COMMENT();
$title = "Customer Reviews";
$content = '<div class="comment_box">' ;
$content .= $comment->getComments();
$content .= '</div>';
任何幫助凝結這個醜陋的混亂是讚賞。
如果您'正在尋找關於編碼風格的建議,發佈的正確位置是CodeReview.stackexchange.com 。 SO是爲了幫助解決代碼中的問題。 – Barmar
筆記,謝謝。 – rsahs