Skip to content

Instantly share code, notes, and snippets.

@rafabarzotto
Created December 13, 2018 18:23
Show Gist options
  • Save rafabarzotto/675b4e9e6ce48d60d9c3464e8a58d8bb to your computer and use it in GitHub Desktop.
Save rafabarzotto/675b4e9e6ce48d60d9c3464e8a58d8bb to your computer and use it in GitHub Desktop.
Encode utf8 php
function utf8ize($d) {
if (is_array($d)) {
foreach ($d as $k => $v) {
$d[$k] = utf8ize($v);
}
} else if (is_string ($d)) {
return utf8_encode($d);
}
return $d;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment