Skip to content

Commit 3a42034

Browse files
committed
edits
1 parent 4470125 commit 3a42034

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

source/includes/write/delete.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
require 'vendor/autoload.php'; // Ensure you have MongoDB PHP library installed
2+
require 'vendor/autoload.php';
33

44
$uri = getenv('MONGODB_URI') ?: throw new RuntimeException('Set the MONGODB_URI variable to your Atlas URI that connects to the sample dataset');
55
$client = new MongoDB\Client($uri);
@@ -29,7 +29,6 @@
2929
// Deletes and prints the number of documents that have a "cuisine" value of "Greek"
3030
// start-delete-count
3131
$result = $collection->deleteMany(['cuisine' => 'Greek']);
32-
echo $result->getDeletedCount() . PHP_EOL;
32+
echo 'Deleted documents: ' . $result->getDeletedCount() . PHP_EOL;
3333
// end-delete-count
3434

35-
?>

source/write/delete.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ operation:
145145
:language: php
146146
:dedent:
147147

148-
.. tip::
148+
.. note::
149149

150150
If the preceding example used the ``deleteOne()`` method instead of
151151
``deleteMany()``, the driver would delete only the first document that has
@@ -173,6 +173,7 @@ that have a ``cuisine`` value of ``'Greek'``. It then calls the ``getDeletedCoun
173173
member function to print the number of deleted documents:
174174

175175
.. io-code-block::
176+
:copyable:
176177

177178
.. input:: /includes/write/delete.php
178179
:start-after: start-delete-count
@@ -181,11 +182,12 @@ member function to print the number of deleted documents:
181182
:dedent:
182183

183184
.. output::
185+
:visible: false
184186

185187
Deleted documents: 111
186188

187189
API Documentation
188-
~~~~~~~~~~~~~~~~~
190+
-----------------
189191

190192
To learn more about any of the methods or types discussed in this
191193
guide, see the following API documentation:

0 commit comments

Comments
 (0)