Syntax highlighting and fix typo in example

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@327466 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Hannes Magnusson 2012-09-04 12:47:49 +00:00
parent 1c964dfab8
commit 2365c0c368

View file

@ -75,6 +75,7 @@
</para>
<programlisting role="php">
<![CDATA[
<?php
$m = new Mongo;
$c = $m->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);
?>
]]>
</programlisting>
&example.outputs;