Created
May 16, 2014 20:53
-
-
Save travisfont/54e3ba2c4bac3e0b9601 to your computer and use it in GitHub Desktop.
Comparisons of str_replace inside a loop
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 | |
$aHeader = array_map(function($key) | |
{ | |
return str_replace(' ', '', $key); | |
}, $aHeader); | |
foreach(aHeader as $key => $value) | |
{ | |
$aheader[tr_replace(' ', '', $key)] = value; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment