Hello I have the following method. I would like to use a nameless function and change some data before the method returns, instead of creating a separate function to localize the results from the database query. I would also like the method to return the filtered data from the nameless function. What am I doing wrong in the following code?
public function getStats($request){
// some custom input filtering
$params = array('uid' => $this->uid);
$reply = $db->get($query,$params);
return function() use (&$reply){
//localization of some strings
return $reply;
};
}