title: Retrieving string-encoded binary data from MongoDB in PHP
body: <p>I have stored some binary data in MongoDB as a string. How can I retrieve it from PHP?</p>
  
  <p><a href="http://api.mongodb.org/perl/current/MongoDB/DataTypes.html#Binary%20Data" rel="nofollow">This article</a> describes how to do it in Perl, but how can I manage it in PHP?</p>
  
  <p>The following doesn't work:</p>
  
  <pre><code>$query = array('md5' =&gt; "00&lt;ΧTcwdrC");
  $cursor = $collection-&gt;find($query);
  </code></pre>