Created
October 19, 2016 07:52
-
-
Save samelm/1f1be229da57aa013692a3fd02b7ccec to your computer and use it in GitHub Desktop.
Revisions
-
samelm created this gist
Oct 19, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ <?php $result = []; foreach ($array as $item) { $letter = mb_strtoupper(mb_substr($item, 0, 1)); $result[$letter][] = $item; } ?>