我想在我的數據庫中回顯超過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