PHP code example of akkroo / phpmongoquery

1. Go to this page and download the library: Download akkroo/phpmongoquery library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

akkroo / phpmongoquery example snippets




use Akkroo\PHPMongoQuery;

$query = array('a' => 'foo', 'b' => array('$ne' => 'bar'));
$document = array(
			'id' => 1,
			'a' => 'foo',
			'b' => 'barr'
		);
var_dump(PHPMongoQuery::executeQuery($query, $document));