下面的代碼有沒有問題,我只需要添加一個內聯風格內嵌樣式添加到div標籤在PHP
<div id="nav-menu" style="width:65px;">
它。我需要你的幫助來包含這種風格。
<?php
$pages = array('health.php' => 'Health',
'weightloss.php' => 'Weight Loss',
'fitness.php' => 'Fitness',
'sex.php' => 'Sex',
'mindbody.php' => 'Mind-Body',
'food.php' => 'Food',
'beauty.php' => 'Beauty',
'more.php' => 'More');
echo "<div id=\"nav-menu\">\n";
// let's create a unordered list to display the items
echo "<ul>";
// here's where all the items get printed
foreach ($pages as $Listing) {
echo "<li>$Listing</li>\n";
}
// closing the unordered list
echo "</ul>";
echo "</div>\n";
?>
你打開在編輯器中的文件,並鍵入在它應該是代碼。 –