Created
March 23, 2012 09:19
-
-
Save Stanton/2168849 to your computer and use it in GitHub Desktop.
for James
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 characters
<?php | |
$test = array('a', 'b', 'c'); | |
function clean($input) | |
{ | |
$output = $input . '!'; | |
return $output; | |
} | |
$clean = array(); | |
foreach ($test as $key => $value) { | |
$clean[$key] = clean($test[$key]); | |
} | |
print_r($clean); | |
/** | |
* returns Array ( [0] => a! [1] => b! [2] => c! ) | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment