Wordpress: get_user_meta - Two Variables in one Field
<p>I do have a quick question because I have no idea how to solve that. I get the following user meta data from my database with the following code:</p>

<pre><code>&lt;?php
        $current_user = wp_get_current_user();
        $birthday_day = get_user_meta( $current_user-&gt;ID, 'geburtstag', true );
        $emailvalue = get_user_meta( $current_user-&gt;ID, 'user_email', true );
        $firstNamevalue = get_user_meta( $current_user-&gt;ID, 'first_name', true );
        $lastNamevalue = get_user_meta( $current_user-&gt;ID, 'last_name', true );
?&gt;
</code></pre>

<p>Now I would like to post those values with an array into another table at my database. Therefore I have the following code:</p>

<pre><code>&lt;?php
        $wpdb-&gt;insert($paymentTable,
      array(
        'event_id'=&gt; $id,
        'date_id'=&gt; $dateid,
        'ticket_id'=&gt; $ticket,
        'coupon'=&gt; $coupon,
        'date_paid'=&gt; $payment_date,
        'type'=&gt; $bookingType,
        'name'=&gt; $firstNamevalue,
        'email'=&gt; $emailvalue,
        'birthday'=&gt; date('Y-m-d', strtotime($birthday_day)),
        'phone'=&gt; $phone,
        'address'=&gt; $address,
        'txn_id'=&gt; 'N.A',
        'amount'=&gt; $amount,
        'quantity'=&gt; $quantity,
        'status'=&gt; $status,
        'extras'=&gt; $formStuff)
    );
?&gt;
</code></pre>

<p>Everything is working fine and everything is saved inside my database in the correct table. The only problem I have now is, that in my field 'name' only the first name of my user is written! </p>

<p>How can I achieve it that $firstNamevalue and $lastNamevalue are written inside my field 'name' so that there is: John Doe instead of only John as it is right now. Can someone tell me how I can do that with my array?</p>

<p>I really appreciate any help!</p>

<p>Thanks,
Chris</p>