mb_convert_variables
mb_convert_variablesã£ã¦ããé¢æ°ããããã¨ãç¥ã£ãã渡ããå¤æ°ï¼é
åãå«ãï¼ã®æåã¨ã³ã³ã¼ãã£ã³ã°ã®å¤æããã¦ãããã
使ãæ¹ã¯:
mb_convert_variables('UTF-8', 'EUC-JP', &$src);
åç §æ¸¡ãã§å¤æãããå¤æ°ãåç §æ¸¡ãã§å¼æ°ã«è¨å®ããã
ä»ã¾ã§ã¯ãããã£ã¦ã:
$src = conv($src, 'UTF-8', 'EUC-JP'); function conv($src, $to, $from) { if (is_array($src)) { foreach ($keys as $key => $value) { $src[$key] = conv($value, $to, $from); } return $src; } return mb_convert_encoding($src, $to, $from); }
mb_convert_variablesã使ãã¨è¨è¿°ãçããªã£ã¦ã¨ã¦ãããæãã