Created
November 12, 2015 23:26
-
-
Save nickkoskowski/4c2ee36a61e6719b5189 to your computer and use it in GitHub Desktop.
Alphabetical Tabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $user_query = get_users($args = array('orderby' => 'first_name','order' => 'ASC' )); | |
| $i = 0; | |
| foreach ($user_query as $user) { | |
| if (substr($user_query[$i - 1]->first_name, 0, 1) != substr($user->first_name, 0, 1)) { | |
| echo '<span class="lettering">'.substr($user->first_name, 0, 1).'</span>'; | |
| } | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment