如果你看看你會看到,我有這個問題。
底部2個鏈接不匹配的前3名。
這裏是代碼:
<?PHP
include_once('include/connection.php');
include_once('include/article.php');
$category = new category;
$articles = $category->fetch_all();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Xclo.mobi</title>
<link type="text/css" rel="stylesheet" href="other.css" />
<link rel="apple-touch-icon" href="homescreen.png" />
<link href="startup.png" rel="apple-touch-startup-image" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34172259-1']);
_gaq.push(['_setDomainName', 'xclo.co.uk']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<?php include_once('header.php'); ?>
<div id="content">
<ul class="pageitem">
<li class="button"><input name="Submit" value="Food" onclick="window.location='food.html' " type="submit" /></li></ul>
<ul class="pageitem">
<li class="button"><input name="Submit" value="Make A Change" onclick="window.location='change.html' " type="submit" /></li></ul>
<ul class="pageitem">
<li class="button"><input name="Submit" value="Finance" onclick="window.location='insurance.html' " type="submit" /></li></ul>
<?php foreach ($articles as $article) { ?>
<ul class="pageitem"><li class="button">
<a href="list.php?id=<?php echo $article['promo_cat']; ?>">
<input type="submit" name="Submit" value="<?php echo $article['promo_cat']; ?>" style="text-decoration: none;"/>
</li></ul>
</a> <?php } ?>
</div>
<br><center>
<SCRIPT charset="utf-8" type="text/javascript" src="http://ws-eu.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fxclo-21%2F8002%2Fc2cd2f40-ca29-49bc-add9-6cf16307e855"> </SCRIPT> <NOSCRIPT><A HREF="http://ws-eu.amazon-adsystem.com/widgets/q?rt=tf_sw&ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fxclo-21%2F8002%2Fc2cd2f40-ca29-49bc-add9-6cf16307e855&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT></center>
<?php include_once('footer.php'); ?>
</body>
</html>
前3名是手動輸入HTML但底部2從我的數據庫抓起。
我的問題是這樣的:
兩個2種具有相同的「禮」和「UL」標籤。那爲什麼他們看起來不一樣?
謝謝。
EDIT
值用於底部2是:
<?php foreach ($articles as $article) { ?>
<ul class="pageitem"><li class="button">
<a href="list.php?id=<?php echo $article['promo_cat']; ?>">
<input type="submit" name="Submit" value="<?php echo $article['promo_cat']; ?>" style="text-decoration: none;"/>
</li></ul>
</a> <?php } ?>
但它需要刪除下劃線。
那麼,前三個鏈接實際上是''提交按鈕,最下面兩個鏈接是實際''鏈接。你可以改變PHP的底部兩個鏈接,以匹配''的形式嗎? – pandubear
看看我編輯我的代碼的原始文章。再看看我的網站。 – kevstarlive
前三個鏈接和後兩個鏈接的HTML仍然存在差異。如果您查看生成的HTML頁面的來源,可能會更容易看到。 – pandubear