Answers for "php mongodb get all documents"

PHP
0

php mongodb get all documents

<?php
$connection = new MongoClient();
$collection = $connection->database->collectionName;

$cursor = $collection->find();
foreach ( $cursor as $id => $value )
{
    echo "$id: ";
    var_dump( $value );
}
?>
Posted by: Guest on February-23-2021

Code answers related to "php mongodb get all documents"

Browse Popular Code Answers by Language