Created
December 13, 2018 18:23
-
-
Save rafabarzotto/675b4e9e6ce48d60d9c3464e8a58d8bb to your computer and use it in GitHub Desktop.
Encode utf8 php
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
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