title: MongoDB Collection runCommand from PHP
body: <p>I have this <a href="http://blog.mongodb.org/post/40513621310/mongodb-text-search-experimental-feature-in-mongodb" rel="nofollow">example</a>.</p>
  
  <pre><code>db.Wall.runCommand( "text", { search : "See" } );
  </code></pre>
  
  <p>How to call this from PHP? I can't find the method in <code>MongoCollection</code> class,</p>
  
  <p>Note I'm running mongo 2.4 dev version.</p>
  
  <p>I tried to use the command method  with no luck Collection called Wall</p>
  
  <pre><code>$ret = $db-&gt;command( array(
                          "runCommand" =&gt; "Wall",
                          "text" =&gt; array('search' =&gt; $text))
                      );
  </code></pre>
  
  <p>The output was </p>
  
  <pre><code>Array ( [ok] =&gt; 0 [errmsg] =&gt; no such cmd: runCommand [bad cmd] =&gt; Array ( [runCommand] =&gt; Wall [text] =&gt; Array ( [search] =&gt; See ) ) )
  </code></pre>
  
  <p>I found the Answer but I need to wait 7 hrs because my reputation is LOW :)</p>
  
  <pre><code>$ret = $db-&gt;command( array(
                          "text" =&gt; "Wall",
                          "search" =&gt; $text)
                      );
  </code></pre>