Created
May 11, 2015 08:27
-
-
Save jawdatls/4b5840819b7eb67eb1f5 to your computer and use it in GitHub Desktop.
convert 1,2,3 keys to values
This file contains 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 | |
echo implode(', ',array_intersect_key(array(0=>'guest',1=>'user',2=>'admin'),array_flip(explode(',',$user->role)))); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment