title: wordpress list user roles
body: <p>I am working ion a wordpress project and digging around into roles etc.</p>
  
  <p>I have the following code which basically gets all available roles:</p>
  
  <pre><code>&lt;?php 
       global $wp_roles;
       $roles = $wp_roles-&gt;get_names();
  
       // Below code will print the all list of roles.
       print_r($roles);        
  ?&gt;
  </code></pre>
  
  <p>when i run the above code i get the following output:</p>
  
  <pre><code>array ( [administrator] =&gt; Administrator [editor] =&gt; Editor [author] =&gt; Author [contributor] =&gt; Contributor [subscriber] =&gt; Subscriber [basic_contributor] =&gt; Basic Contributor  ) 
  </code></pre>
  
  <p>i would like the above to be stripped from the array and into just an unordered list. How would i achieve this?</p>
  
  <p>Thanks Dan</p>