get all users custom meta (1 post)

  1. hkaia
    Posted 2 years ago #

    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.]

Topic Closed

This topic has been closed to new replies.

About this Topic