dq_609586475 2018-10-11 10:30
浏览 31

使用@登录php访问MongoDB字段

i have the following php array as a result of a mongodb query:

Array
(
[_id] => MongoDB\BSON\ObjectID Object
    (
        [oid] => 5bbb150093a71e0dfb14b662
    )

[@ID] => 1004

)

How do i access the field with @ID in php?

I can access the _id field like this:

echo $item->_id;

but i cant access the @ID like this:

echo $item->@ID;
  • 写回答

0条回答 默认 最新

    报告相同问题?