WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to Call Custom User Profile Fields from Array? (2 posts)

  1. cpatience
    Member
    Posted 2 years ago #

    I have a user profile array that, when I use print_r returns the following:

    Array ( [0] => Array ( [first_name] => Array ( [0] => Andrea ) [last_name] => Array ( [0] => Weiss ) [nickname] => Array ( [0] => Andrea ) ...(more metas)...

    How can I call the different metas? The following code used to work, but doesn't work since the latest update.

    `foreach($adminauthors as $author) {
    $display_name = $author[nickname];
    echo $display_name;
    }'

    Thanks.

  2. Vanguard Digital
    Member
    Posted 2 years ago #

    you still trying to echo an array

    [last_name] => Array ( [0] => Weiss )

    echo $dislay_name[0];

    should do the trick

Topic Closed

This topic has been closed to new replies.

About this Topic