/ Published in: PHP

Takes the collection 'david' and gives a unique array of the keys used.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$m = new Mongo(); $db = $m->test; $collection = $db->david; $cursor = $collection->find(); foreach ($array as $k=>$v) { foreach ($v as $a=>$b) { $keys[] = $a; } }
Comments
