Skip to content

Instantly share code, notes, and snippets.

@maggo
Created December 1, 2011 08:28
Show Gist options
  • Save maggo/1414988 to your computer and use it in GitHub Desktop.
Save maggo/1414988 to your computer and use it in GitHub Desktop.
Recursive UTF8 encode
<?php
function array_encode(&$arr){
array_walk_recursive($arr, function(&$val, $key){
$val = utf8_encode($val);
});
return $arr;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment