title: mongodb connect using php
body: <p>What if password having <code>@</code> in mongodb connect
  mongodb://[username:password@]host1[:port1][,host2[:port2:],...]/db
  suppose <code>username='abc'</code> and <code>password='abc@123'</code>
  and in php we create mongo db instance like</p>
  
  <pre><code>$m = new Mongo('mongodb://[abc:abc@123@]localhost/abc');
  </code></pre>
  
  <p>then it gives error like this</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'MongoConnectionException' with message 'couldn't get host info for 123@]localhost'</p>
  </blockquote>
  
  <p>then how to solve this type of problem..</p>