passing a callback function to getSearchResults() to allow manipulation of the returned data in php