PHP - Adding multiple database entries
<p>I have a function that adds an entry to the database, the code i have at the moment is as follows:</p>

<pre><code>    function create_internal_role($rolename, $rolekey)
{
    $data = array(
        'name'  =&gt; $rolename,
        'key'   =&gt; $rolekey.'1'
    );
    if (!is_null($res = $this-&gt;ci-&gt;internal_roles-&gt;create_role($data))) {
        return $data;
    }

    return NULL;
}
</code></pre>

<p>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</p>

<p>How would i go about doing that?</p>
