How does php query the array stored in MongoDB?

Source: Internet
Author: User
The problem I encountered now is the image information stored by others in mongodb. The key is img, and the value is a url array. When I use the mongodb extension of php to query, the img domain returns a string, but what I want to get is the saved array object. Is there any way to get one... the problem I encountered is that MongodbImage Information stored in, KeyIs Img, ValueFor UrlArray.
When I use PhpOf MongodbExtended to query, ImgThe returned field is a string, but what I want to get is the stored array object. Is there any way to get an array object?
Which of the following statements is used for my query? Export cursor: find ()This API. I am also the first time using NoSQL databases ..

Reply content:

The problem I encountered is thatMongodbImage Information stored in,KeyIsImg,ValueForUrlArray.
When I usePhpOfMongodbExtended to query,ImgThe returned field is a string, but what I want to get is the stored array object. Is there any way to get an array object?
Which of the following statements is used for my query?Export cursor: find ()This API. I am also the first time using NoSQL databases ..

I have never used it, noYou can try to save json_encode ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.