Last active
December 20, 2015 10:39
-
-
Save hungneox/6116777 to your computer and use it in GitHub Desktop.
combine key value with array_walk
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 | |
$a = array( | |
'email' => 'test@test.com', | |
'desc' => 'Who know', | |
'button_link' => 'yest' | |
); | |
function qh_combine(&$item, $key){ | |
$item = "$key : $item"; | |
} | |
array_walk($a, 'qh_combine'); | |
print_r($a); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment