Created
March 1, 2017 10:16
-
-
Save sworup/4e05336d81805a14321b150adc44296a to your computer and use it in GitHub Desktop.
Decode all the values in an array to UTF-8
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 | |
function utf8_decode_all($dat) | |
{ | |
if (is_string($dat)) return utf8_decode($dat); | |
if (!is_array($dat)) return $dat; | |
$ret = array(); | |
foreach($dat as $i=>$d) $ret[$i] = utf8_decode_all($d); | |
return $ret; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment