title: In wordpress User group using php
body: <p>How to display (echo) the user group using php.</p>
  
  <p>I have displayed user name, and user email and user ID.  </p>
  
  <p>But I would like to add the user group also.</p>
  
  <p>How to do that?</p>
  
  <p>Now I have created a php code to list name, id and email address.</p>
  
  <pre><code>&lt;?php
      $order = 'user_nicename';
      $users = get_users( 'search=*' ); 
      foreach($users as $user) :
      echo $user-&gt;user_nicename ; ?&gt;
      echo $user-&gt;user_firstname; ?&gt;
      echo $user-&gt;user_lastname; ?&gt;
      echo $user-&gt;user_email; ?&gt;
      endforeach;
  ?&gt;
  </code></pre>