0
我有PHP代碼顯示MongoDB中收集數據到PHP tablle,當我運行它,它不顯示任何輸出,MongoDB的採集數據到PHP表問題
請善待足以解決這
在這裏我的代碼
<?php
$m = new MongoClient();
$db = $m->selectDB('MapData');
$collection = new MongoCollection($db,'ETom4');
$cursor = $collection->find();
//echo "<html><head><body>";
echo "<table>";
foreach($cursor as $doc) {
echo "<tr>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Marks'] . "</td>";
echo "<td>" . $row['value'] . "</td>";
echo "</tr>";
}
echo "<table>";
//echo "</html></head></body>";
?>
感謝,做工精細,我注意到我的錯誤:) – Kavinda
@Kavinda請檢查您的所有問題的答案,並嘗試以紀念這是correct.Thanks的答案。 –