I
I
Igor Tkachenko2016-07-28 10:46:30
PHP
Igor Tkachenko, 2016-07-28 10:46:30

How to write multidimensional php array to mongodb with one request?

There is a library https://github.com/mongodb/mongo-php-library , how to use it to write the entire multidimensional array at once, as for example it can be done in node.js (immediately pass an object to the insert).

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2016-07-28
@karminski

Serialize array to JSON and save as string?

I
Ilya Karavaev, 2016-12-26
@Quieteroks

What is the question at all? If you use this library, then nothing changes, except for the name of the method:
Your entire multidimensional array will be saved and even possibly return the _id of the saved record.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question