title: Create database in mongoDB using php
body: <p>I am on mongoDB 3 and php version 5.6. I want to create a database for adding data in it. I am trying in this way. </p>
  
  <pre><code>&lt;?php
  
      require 'vendor/autoload.php';
  
     // connect to mongodb
  
     $db = new MongoDB\Client("mongodb://localhost:27017");
  
     echo "Connected";
  
     // select a database
     $data = $db-&gt;selectDatabase("admin");
  
     echo "Done ";
  ?&gt;
  </code></pre>
  
  <p>This code is running well but not making any database in the <code>MongoDB</code>. Can someone help?</p>