[eluser]Iciclefeet[/eluser]
Is there a way to Use Model Function in a array_map callback
Example Model with Callback function
Code:
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class global_functions extends CI_Model {
//Adds BackTicks to Header
public function Mysql_Header_BackTick($Headers){
return "`".$Headers."`";
}
}
Example Call
Code:
$Header=Array('Example 1'=>100,
'Example2'=>100,
'Example 3'=>120);
$SelectHeaders=array_map("\$this->global_functions->Mysql_Header_BackTick",array_keys($Header));
This is the warning message i get when i try.
Warning Message
array_map() expects parameter 1 to be a valid callback, function '$this->global_functions->Mysql_Header_BackTick' not found or invalid function name
Thanks in advance.