this can be a little tricky. First here's my function:

public function transfer_smf_userinfo($username)
{
    $sys_columns = implode(', ', $this->_config['bbauth']['columns']['sys']);
    $smf_columns = implode(', ', $this->_config['bbauth']['columns']['smf']);

    $question_marks;

    for($i = 0; $i > sizeof($this->_config['bbauth']['columns']['sys']); $i++)
    {
        if(sizeof($this->_config['bbauth']['columns']['sys']) == $i - 1)
        {
            $question_marks .'?';  
        }
        else {
            $question_marks .'?, ';
        }
    }

    $user = $this->smf_db->query('SELECT '. $smf_columns .' FROM `smf_members` WHERE member_name = ? LIMIT 1', array($username));

    if($user->num_rows > 0)
    {
        $user = $user->row_array();

        $user['register_date'] = date('Y-m-d H:i:s', $user['register_date']);
        $user['last_login'] = date('Y-m-d H:i:s', $user['last_login']);

        $transfer_user = $this->sys_db->query('INSERT INTO `members` ('. $sys_columns .') VALUES ('. $question_marks .')', array());

        if($transfer_user)
        {
            return true;
        }
        else {
            return false;
        }
    }
    else {
        return false;
    }
}

$sys_posts results:

id, username, password, email, url, avatar, b_date, r_date, l_date

$smf_posts results:

id_member, member_title, passwd, email_address, website_url, avatar, birthdate, date_registered, last_login

I want the array in the finish from the line around the $transfer_user query to possess a array like so.

array($user['column'], $user['another']);

But I have to get it done dynamically with every row from $smf_posts.

Basically comprehend the problem properly. Try:

$data=array();
foreach($this->_config['bbauth']['columns']['smf'] as $column)
     $data[]=$user[$column];
$transfer_user = $this->sys_db->query(
     'INSERT INTO `members` ('. $sys_columns .') VALUES ('. $question_marks .')',
     $data);