我想获取所有用户各自的数据。我已经获得了所有用户:
$users = array();
$users_query = new WP_User_Query( array(
\'role\' => \'subscriber\',
\'orderby\' => \'user_registered\',
\'number\' => 8,
\'order\' => \'DESC\',
\'fields\' => array(\'ID\', \'display_name\')
) );
$results = $users_query->get_results();
但我只从用户表中获取数据:
object(stdClass)#3162 (10) {
["ID"]=>
string(2) "44"
["user_login"]=>
string(13) "usuarioprueba"
["user_nicename"]=>
string(13) "usuarioprueba"
["user_url"]=>
string(0) ""
["user_registered"]=>
string(19) "2016-10-13 16:27:56"
["user_status"]=>
string(1) "0"
["display_name"]=>
string(14) "Usuario Prueba"
} ...
如何从中获取数据
usermeta
无需使用像
foreach