title: Call class method from inside array_map anonymous function
body: <p>I am trying to call one of my object's methods from within an <code>array_map</code> anonymous function. So far I am receiving the expected error of:</p>
  
  <blockquote>
    <p>Fatal error: Using $this when not in object context in...</p>
  </blockquote>
  
  <p>I know why I am getting this error, I just don't know a way to achieve what I am trying to... Does anybody have any suggestions?</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>// Loop through the data and ensure the numbers are formatted correctly
  array_map(function($value){
      return $this-&gt;some_method($value,'value',false);
  },$this-&gt;mssql-&gt;data[0]['results'][0]);
  </code></pre>