Skip to content

Instantly share code, notes, and snippets.

@Stanton
Created March 23, 2012 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stanton/2168849 to your computer and use it in GitHub Desktop.
Save Stanton/2168849 to your computer and use it in GitHub Desktop.
for James
<?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