在php和html中使用标记 [英] using tag in php and html
本文介绍了在php和html中使用标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
myfile = mysql_query($query_myfile, $db) or die(mysql_error());
$totalRows_myfile = mysql_num_rows($myfile);
$typ_d = '';
$test='';
while ( $row_myfile = mysql_fetch_assoc($myfile) )
{
if ( $typ_d != $row_myfile[ 'typ_d' ] )
{
$typ_d = $row_myfile[ 'typ_d' ];
echo "<h2>$typ_d</h2>";
}
if ( $test != $row_myfile[ 'test' ] )
{
$test = $row_myfile[ 'test' ];
echo "<h3>$test</h3>";
}
echo "<li><a href=\"myfileDetail.php?myfile_id=".$row_myfile['myfile_id']. "\">";
echo $row_myfile['shortname'].' ';
echo $row_myfile['name']; ?></a></li>
<?php } ?>
我试图将结果列表分组在
I tried to group the resulting list in
<ul>
中,例如
like
first groups
<ul>
<li>list1</li>
<li>list2</li>
<li>list3</li>
</ul>
second groups
<ul>
<li>lista</li>
<li>listb</li>
<li>listc</li>
</ul>
.
.
.
但我从来没有以正确的顺序得到它..请帮助
but I never get it with the right order ..please need help
推荐答案
query_myfile,
query_myfile,
db)或 die(mysql_error());
db) or die(mysql_error());
totalRows_myfile = mysql_num_rows(
totalRows_myfile = mysql_num_rows(
这篇关于在php和html中使用标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文