Skip to content

Instantly share code, notes, and snippets.

@polidog
Created February 28, 2014 10:22
Show Gist options
  • Save polidog/9268676 to your computer and use it in GitHub Desktop.
Save polidog/9268676 to your computer and use it in GitHub Desktop.
phpでの文字コードを変換するときに再起的に行う
<?php
array_walk_recursive($_GET, function(&$value){
$value = mb_convert_encoding($value, 'UTF_8', 'SJIS-win');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment