Created
July 24, 2018 21:08
-
-
Save mdjwel/b1b73e505cca3f918e37210c6741e623 to your computer and use it in GitHub Desktop.
Convert icon classes to icon names.
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 | |
function chaoz_icon_array($k) { | |
$v = array(); | |
foreach ($k as $kv) { | |
$kv = str_replace('-', ' ', $kv); | |
$kv = str_replace('icon', '', $kv); | |
$v[] = array_push($v, ucwords($kv)); | |
} | |
foreach($v as $key => $value) if($key&1) unset($v[$key]); | |
return array_combine($k, $v); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment