我想在我的数据库中回显超过1个ID,如何在索引页中显示多于1个ID?回声超过1个ID
我的功能:
function query($sql) {
global $conn;
$results = mysql_query($sql, $conn);
$rows = array();
if(!is_bool($results))
while($row = mysql_fetch_assoc($results))
$rows['id'] = $row;
return $rows;
}
我的索引页:
<?php foreach($funds as $fund) { ?>
<td width="87%" valign="top"><ul id="funds" class="bodycopy2" style="margin:0;">
<li><?php echo $fund['fund']; ?><span class="price"><div align="center" class="h1"><strong><br />R123.45</strong> <br />as at <br />1 January 2012</div></span></li>
<li><?php echo $fund['fund']; ?><span class="price"><div align="center" class="h1"> <strong><br />R200.45</strong> <br />as at <br />1 January 2012</div></span> </li>
<li><?php echo $fund['fund']; ?><span class="price"><div align="center" class="h1"> <strong><br />R150.00</strong> <br />as at <br />1 January 2012</div></span></li>
</td>
</tr>
</table>
<?php } ?>
而现在的问题是ID ....? – KingCrunch 2012-03-12 10:09:53
不知道配置与你的功能有什么关系。也不知道你如何使用查询功能。也不知道这个问题应该是什么! – Sgoettschkes 2012-03-12 10:20:41