note 103956 deleted from function.utf8-encode by cmb

From: Date: Sun, 22 Dec 2019 09:03:05 +0000
Subject: note 103956 deleted from function.utf8-encode by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213582@lists.php.net to get a copy of this message
Note Submitter: bastianschwarz t live punkt de ---- My version for converting ISO array keys to utf8: <?php function convertArrayKeysToUtf8(array $array) { $convertedArray = array(); foreach($array as $key => $value) { if(!mb_check_encoding($key, 'UTF-8')) $key = utf8_encode($key); if(is_array($value)) $value = $this->convertArrayKeysToUtf8($value); $convertedArray[$key] = $value; } return $convertedArray; } ?>

« previous php.notes (#213582) next »