note 110019 deleted from function.utf8-decode by cmb
| From: | cmb@php.net | Date: | Sun, 04 Dec 2016 12:08:05 +0000 |
| Subject: | note 110019 deleted from function.utf8-decode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208184@lists.php.net to get a copy of this message | ||
Note Submitter: Michael Pfister
----
I personally prefer this method for decoding an array:
<?php
private function utf8DecodeArray(&$item, $key) {
$item = utf8_decode($item);
}
?>
Then just call it like this within the same class:
array_walk_recursive($YOURARRAY, array(&$this, 'utf8DecodeArray'));
This will replace your array with the utf8 decoded one.