From 2365c0c3683fac59090b1f6d74e6f8c981d28d82 Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Tue, 4 Sep 2012 12:47:49 +0000 Subject: [PATCH] Syntax highlighting and fix typo in example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@327466 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/mongo/mongocollection/aggregate.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/mongo/mongocollection/aggregate.xml b/reference/mongo/mongocollection/aggregate.xml index 17be842531..ede89355b7 100644 --- a/reference/mongo/mongocollection/aggregate.xml +++ b/reference/mongo/mongocollection/aggregate.xml @@ -75,6 +75,7 @@ selectDB("examples")->selectCollection("article"); $c->drop(); @@ -110,13 +111,14 @@ $ops = array( array('$unwind' => '$tags'), array( '$group' => array( - "_id" => array("tags" => 1), + "_id" => array("tags" => '$tags'), "authors" => array('$addToSet' => '$author'), ), ), ); $results = $c->aggregate($ops); var_dump($results); +?> ]]> &example.outputs;