I have a function that adds an entry to the database, the code i have at the moment is as follows:
function create_internal_role($rolename, $rolekey)
{
$data = array(
'name' => $rolename,
'key' => $rolekey.'1'
);
if (!is_null($res = $this->ci->internal_roles->create_role($data))) {
return $data;
}
return NULL;
}
What i want to do, is using the same function add another 2 data arrays with a 2 and 3 behind the $rolekey, so that with the one function, it adds 3 lots of data, rolekey1, rolekey2 and rolekey3
How would i go about doing that?