Skip to content

Instantly share code, notes, and snippets.

View alimashuri's full-sized avatar

Ali Mashuri alimashuri

View GitHub Profile
@alimashuri
alimashuri / step01.php
Created July 6, 2011 08:36 — forked from gatesvp/step01.php
PHP commands for basic MongoDB operations
<?php
try {
$mongo = new Mongo(); // default host:port
$db = $mongo->example;
$collection = $db->test;
$document = array('x' => 1);
$collection->insert($document);
print_r($document);