当我使用 <ul>
标记,但当我尝试在选择框中显示文章类别时,它不起作用。
这是我的密码:
<select>
<?php
$stmt = $db->query('SELECT catTitle, catSlug FROM blog_cats ORDER BY catID
DESC');
while($row = $stmt->fetch()){
echo '<option value="$val"><a href="c'.$row['catSlug'].'">'.$row['catTitle'].'</a></option>';
}?>
</select>
<ul>
<?php
$stmt = $db->query('SELECT catTitle, catSlug FROM blog_cats ORDER BY catID DESC');
while($row = $stmt->fetch()){
echo '<li><a href="c-'.$row['catSlug'].'">'.$row['catTitle'].'</a></li>';
}?>
</ul>
暂无答案!
目前还没有任何答案,快来回答吧!