note 110446 added to function.array-walk-recursive

From: Date: Tue, 23 Oct 2012 10:11:44 +0000
Subject: note 110446 added to function.array-walk-recursive
Groups: php.notes 
Request: Send a blank email to php-notes+get-191493@lists.php.net to get a copy of this message
To convert all values of an array in UTF8, do this: <?php function convert_before_json(&$item, &$key) { $item=utf8_encode($item); } array_walk_recursive($your_array,"convert_before_json"); ?> ---- Server IP: 46.22.129.76 Probable Submitter: 87.198.254.82 ---- Manual Page -- http://www.php.net/manual/en/function.array-walk-recursive.php Edit -- https://master.php.net/note/edit/110446 Del: integrated -- https://master.php.net/note/delete/110446/integrated Del: useless -- https://master.php.net/note/delete/110446/useless Del: bad code -- https://master.php.net/note/delete/110446/bad+code Del: spam -- https://master.php.net/note/delete/110446/spam Del: non-english -- https://master.php.net/note/delete/110446/non-english Del: in docs -- https://master.php.net/note/delete/110446/in+docs Del: other reasons-- https://master.php.net/note/delete/110446 Reject -- https://master.php.net/note/reject/110446 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#191493) next »