使用PHP仅显示MongoDB中选定的文档(列)?
我使用的是使用PHP的MongoDB,下面是 我的连接详细信息我正在尝试从内部数组中排除[Type]使用PHP仅显示MongoDB中选定的文档(列)?,php,database,mongodb,Php,Database,Mongodb,我使用的是使用PHP的MongoDB,下面是 我的连接详细信息我正在尝试从内部数组中排除[Type] $collection= $client->DB->collection; $currentdate = date("Y-m-d"); $filter = ['date' => $currentdate]; $options = []; $cursor= $collection->find($filter, $options)->
$collection= $client->DB->collection;
$currentdate = date("Y-m-d");
$filter = ['date' => $currentdate];
$options = [];
$cursor= $collection->find($filter, $options)->toArray();
这是我的模式
_id: objectID("abc47474790bc");
title: Hi here is news
summary: news is all about
newData[
[0]
title: first time life
id: 1
summary: there is some time
type: school
date: 22-9-2020
[1]
title: during all daytime
id: 2
summary: Matthew Carlsen
type: college
date: 22-9-2020
[3]
title: Kids love to be part of
id: 2
summary: Every day when we are
type: Elementary
date: 22-9-2020
我试图从数组中排除要打印的type:elemental,我该如何做