I am working on a wordpress project and delving into roles, etc.
I have the following code that basically gets all the roles available:
<?php global $wp_roles; $roles = $wp_roles->get_names();
when I run the above code, I get the following output:
array ( [administrator] => Administrator [editor] => Editor [author] => Author [contributor] => Contributor [subscriber] => Subscriber [basic_contributor] => Basic Contributor )
I would like the above to be removed from the array and into a simply unordered list. How can i achieve this?
Thanks Dan
danyo source share