Skip to content

Commit 8d2f8dc

Browse files
OskarStarkalcaeus
andauthored
Add PHP open tag to examples (#1037)
* [Documentation] Add PHP open tag to examples * Update docs/faq.txt Co-authored-by: Andreas Braun <[email protected]> Co-authored-by: Andreas Braun <[email protected]>
1 parent 4172b6f commit 8d2f8dc

File tree

5 files changed

+12
-0
lines changed

5 files changed

+12
-0
lines changed

source/reference/method/MongoDBCollection-find.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ returned. It also limits the results to 5 documents.
5656

5757
.. code-block:: php
5858

59+
<?php
60+
5961
$collection = (new MongoDB\Client)->test->restaurants;
6062

6163
$cursor = $collection->find(

source/reference/method/MongoDBCollection-findOne.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ special BSON type, the query criteria for selecting a restaurant must use the
6262

6363
.. code-block:: php
6464

65+
<?php
66+
6567
$database = (new MongoDB\Client)->test;
6668

6769
$zip = $database->zips->findOne(['_id' => '10036']);
@@ -80,6 +82,8 @@ returned.
8082

8183
.. code-block:: php
8284

85+
<?php
86+
8387
$collection = (new MongoDB\Client)->test->restaurants;
8488

8589
$restaurant = $collection->findOne(

source/reference/method/MongoDBCollection-updateMany.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ The following example updates all of the documents with the ``borough`` of
5757

5858
.. code-block:: php
5959

60+
<?php
61+
6062
$collection = (new MongoDB\Client)->test->restaurants;
6163

6264
$updateResult = $collection->updateMany(

source/reference/method/MongoDBCollection-updateOne.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ The following example updates one document with the ``restaurant_id`` of
5959

6060
.. code-block:: php
6161

62+
<?php
63+
6264
$collection = (new MongoDB\Client)->test->restaurants;
6365

6466
$updateResult = $collection->updateOne(

source/tutorial/crud.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,8 @@ An equivalent filter could be constructed using the :query:`$regex` operator:
380380

381381
.. code-block:: php
382382

383+
<?php
384+
383385
[
384386
'city' => ['$regex' => '^garden', '$options' => 'i'],
385387
'state' => 'TX',

0 commit comments

Comments
 (0)