note 90718 deleted from function.utf8-decode by cmb
| From: | cmb@php.net | Date: | Sun, 04 Dec 2016 12:10:23 +0000 |
| Subject: | note 90718 deleted from function.utf8-decode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208191@lists.php.net to get a copy of this message | ||
Note Submitter: pedro at pontonet dot com
----
I've modified above utf8_array_decode to utf8_array_encode. The main difference is the later
encodes a multi-dimension array.
Here goes the code:
<?php
function utf8_array_encode($input)
{
$return = array();
foreach ($input as $key => $val)
{
if( is_array($val) )
{
$return[$key] = utf8_array_encode($val);
}
else
{
$return[$key] = utf8_encode($val);
}
}
return $return;
}
?>
Enjoy it!
Pedro Bastos