Support » Plugins » get all users custom meta

  • i’m trying to get all users custom meta and merage it in array but i get an error

    $users = get_users(array(
        'meta_key'     => 'phone'
    foreach ($users as  $value) {
        $all_meta_for_user = get_user_meta( $value->ID );
        print_r(array_merge( $all_meta_for_user['phone']));
        foreach ($all_meta_for_user as $meta) {
            // print_r(array_merge());
            //echo $merta;

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

  • The topic ‘get all users custom meta’ is closed to new replies.